"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
"{ Package: 'stx:libbasic' }"
Object subclass:#OSProcess
instanceVariableNames:'pid parentPid commandLine'
classVariableNames:''
poolDictionaries:''
category:'System-Support'
!
!OSProcess class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 2006 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
!
documentation
"
OSProcess is an abstract class. Instances represent operating system processes
(as opposed to Smalltalk processes).
[author:]
Stefan Vogel (stefan@zwerg)
[instance variables:]
pid SmallInteger the process id
parentPid SmallInteger the process id of the parent process
commandLine String the command line of the running command.
[class variables:]
[see also:]
Process
"
! !
!OSProcess methodsFor:'accessing'!
commandLine
^ commandLine
!
commandLine:something
commandLine := something.
!
parentPid
^ parentPid
!
parentPid:something
parentPid := something.
!
pid
^ pid
!
pid:something
pid := something.
! !
!OSProcess methodsFor:'queries'!
getProcessHandle
"some OperatingSystems redefine this to resolve this to a processHandle
(which must be explicitely freed later).
Others simply return the pid here"
^ self subclassResponsibility
!
isAlive
"answer true, if the process is still alive"
^ self subclassResponsibility
!
isDead
"answer true, if the process is no longer alive"
^ self isAlive not
! !
!OSProcess methodsFor:'terminating'!
kill
"kill the process - the process does not get the chance to clean up"
^ self subclassResponsibility.
!
killGroup
"killl the processGroup - the processes does not get the chance to clean up"
^ self subclassResponsibility.
!
killWithAllChildren
"terminate gracefully the process with all of its child processes"
^ self subclassResponsibility.
!
terminate
"terminate the process gracefully"
^ self subclassResponsibility.
!
terminateGroup
"terminate the process group.
Under Windows, these is the same as terminateWithhAllChildren,
under unix, this terminates a subset of all children"
^ self subclassResponsibility.
!
terminateWithAllChildren
"terminate gracefully the process with all of its child processes"
^ self subclassResponsibility.
! !
!OSProcess class methodsFor:'documentation'!
version_CVS
^ 'Header: /cvs/stx/stx/libbasic/OSProcess.st,v 1.1 2010/04/27 08:07:00 stefan Exp ยง'
!
version_SVN
^ '$Id$'
! !