Known subclasses: twisted.internet.process.Process, twisted.internet.process.PTYProcess

Base class for Process and PTYProcess.

Method reapProcess Try to reap a process (without blocking) via waitpid.
Method signalProcess No summary
Method __repr__ String representation of a process.
Method _getReason Undocumented
Method _resetSignalDisposition Undocumented
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 __init__ Undocumented
Method processEnded This is called when the child terminates.
Method maybeCallProcessEnded Call processEnded on protocol after final cleanup.
Method _callProcessExited Undocumented
def reapProcess(self): (source)

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.)

def _getReason(self, status): (source)
Undocumented
def signalProcess(self, signalID): (source)

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 value provided

def _resetSignalDisposition(self): (source)
Undocumented
def _fork(self, path, uid, gid, executable, args, environment, **kwargs): (source)

Fork and then exec sub-process.

Parameterspaththe path where to run the new process. (type: bytes or unicode)
uidif defined, the uid used to run the new process. (type: int)
gidif defined, the gid used to run the new process. (type: int)
executablethe executable to run in a new process. (type: str)
argsarguments used to create the new process. (type: list.)
environmentenvironment used for the new process. (type: dict.)
kwargskeyword arguments to _setupChild method.
def _setupChild(self, *args, **kwargs): (source)

Setup the child process. Override in subclasses.

def _execChild(self, path, uid, gid, executable, args, environment): (source)

The exec() which is done in the forked child.

def __repr__(self): (source)

String representation of a process.

API Documentation for Twisted, generated by pydoctor at 2017-09-23 19:45:03.