'From Smalltalk/X, Version:2.10.8 on 29-dec-1995 at 00:14:10' !
Object subclass:#OSProcessStatus
instanceVariableNames:'pid status code core'
classVariableNames:''
poolDictionaries:''
category:'System-Support'
!
!OSProcessStatus class methodsFor:'documentation'!
documentation
"
This is an auxillary class, that holds information about status changes of
operating system processes (these are no smalltalk processes!!).
Instance variables are:
pid OS-Process identifier
status either #exit #signal #stop #continue
code either exitcode or signalnumber
core true if core has been dumped
"
!
history
"Created: 28.12.1995 / 14:05:19 / stefan"
! !
!OSProcessStatus class methodsFor:'instance creation'!
pid:pid status:status code:code core:core
^ self new pid:pid status:status code:code core:core
"Created: 28.12.1995 / 14:16:14 / stefan"
!
processCreationFailure
^ self new pid:-1 status:#failure code:-1 core:false
"Created: 28.12.1995 / 14:35:29 / stefan"
! !
!OSProcessStatus methodsFor:'accessing'!
code
"return code"
^ code
"Created: 28.12.1995 / 14:05:07 / stefan"
!
code:something
"set code"
code := something.
"Created: 28.12.1995 / 14:05:07 / stefan"
!
core
"return true if core has been dumped, false otherwise"
^ core == true
"Modified: 28.12.1995 / 14:14:38 / stefan"
!
core:something
"set core"
core := something.
"Created: 28.12.1995 / 14:05:07 / stefan"
!
pid
"return pid"
^ pid
"Created: 28.12.1995 / 14:05:07 / stefan"
!
pid:something
"set pid"
pid := something.
"Created: 28.12.1995 / 14:05:07 / stefan"
!
status
"return status"
^ status
"Created: 28.12.1995 / 14:05:07 / stefan"
!
status:something
"set status"
status := something.
"Created: 28.12.1995 / 14:05:07 / stefan"
! !
!OSProcessStatus methodsFor:'initialization'!
pid:newPid status:newStatus code:newCode core:newCore
pid := newPid.
status := newStatus.
code := newCode.
core := newCore.
"Created: 28.12.1995 / 14:18:22 / stefan"
! !
!OSProcessStatus methodsFor:'queries'!
couldNotExecute
"return true when a comman could not be executed"
^ status == #exit and:[code = 127].
"Created: 28.12.1995 / 15:43:17 / stefan"
!
stillAlive
"true if process is still alive"
^ status == #stop or:[status == #continue]
"Created: 28.12.1995 / 14:27:26 / stefan"
!
success
"true if process terminated successfully"
^ status == #exit and:[code = 0]
"Created: 28.12.1995 / 14:13:05 / stefan"
"Modified: 28.12.1995 / 14:13:41 / stefan"
! !
!OSProcessStatus class methodsFor:'documentation'!
version
"
$Header: /cvs/stx/stx/libbasic/Attic/OSProcStat.st,v 1.1 1996-01-03 23:29:23 stefan Exp $
"
! !