twisted.internet.process._BaseProcess(BaseProcess, object)class documentation
twisted.internet.processView Source (View In Hierarchy)
Base class for Process and PTYProcess.
|Method||reapProcess||Try to reap a process (without blocking) via waitpid.|
|Method||__repr__||String representation of a process.|
|Method||_fork||Fork and then exec sub-process.|
|Method||_setupChild||Setup the child process. Override in subclasses.|
|Method||_execChild||The exec() which is done in the forked child.|
Inherited from BaseProcess:
|Method||processEnded||This is called when the child terminates.|
|Method||maybeCallProcessEnded||Call processEnded on protocol after final cleanup.|
Try to reap a process (without blocking) via waitpid.
This is called when sigchild is caught or a Process object loses its "connection" (stdout is closed) This ought to result in reaping all zombie processes, since it will be called twice as often as it needs to be.
(Unfortunately, this is a slightly experimental approach, since UNIX has no way to be really sure that your process is going to go away w/o blocking. I don't want to block.)
Send the given signal
signalID to the process. It'll
translate a few signals ('HUP', 'STOP', 'INT', 'KILL', 'TERM') from a
string representation to its int value, otherwise it'll pass directly the
Fork and then exec sub-process.
|Parameters||path||the path where to run the new process. (type: |
|uid||if defined, the uid used to run the new process. (type: |
|gid||if defined, the gid used to run the new process. (type: |
|executable||the executable to run in a new process. (type: |
|args||arguments used to create the new process. (type: |
|environment||environment used for the new process. (type: |
|kwargs||keyword arguments to |
The exec() which is done in the forked child.
String representation of a process.