Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`internet`.`process`.`_BaseProcess``

class documentation

`class _BaseProcess(BaseProcess): (source)`

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

View In Hierarchy

Base class for Process and PTYProcess.

Method | `__repr__` | String representation of a process.
Method | `reapProcess` | Try to reap a process (without blocking) via waitpid.
Method | `signalProcess` | 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...
Instance Variable | `pid` | Undocumented
Instance Variable | `status` | Undocumented
Method | `_execChild` | The exec() which is done in the forked child.
Method | `_fork` | Fork and then exec sub-process.
Method | `_getReason` | Undocumented
Method | `_resetSignalDisposition` | Undocumented
Method | `_setupChild` | Setup the child process. Override in subclasses.

Inherited from `BaseProcess`:

Method | `__init__` | Undocumented
Method | `maybeCallProcessEnded` | Call processEnded on protocol after final cleanup.
Method | `processEnded` | This is called when the child terminates.
Class Variable | `lostProcess` | Undocumented
Instance Variable | `proto` | Undocumented
Method | `_callProcessExited` | Undocumented

def __repr__(self): (source)

String representation of a process.

Returns
`str` | 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 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

Parameters
signalID:`str` or `int` | Undocumented

pid = (source)
overrides `twisted.internet._baseprocess.BaseProcess.pid`
overridden in `twisted.internet.process.Process`, `twisted.internet.process.PTYProcess`

Undocumented

status: `int` = (source)
overrides `twisted.internet._baseprocess.BaseProcess.status`
overridden in `twisted.internet.process.Process`, `twisted.internet.process.PTYProcess`

Undocumented

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

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

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

Fork and then exec sub-process.

Parameters
path:`bytes` or `unicode` | the path where to run the new process.
uid:`int` | if defined, the uid used to run the new process.
gid:`int` | if defined, the gid used to run the new process.
executable:`str` | the executable to run in a new process.
args:`list`. | arguments used to create the new process.
environment:`dict`. | environment used for the new process.
**kwargs | keyword arguments to `_setupChild` method.

def _getReason(self, status): (source)

Undocumented

def _resetSignalDisposition(self): (source)

Undocumented

def _setupChild(self, *args, **kwargs): (source)
overridden in `twisted.internet.process.Process`, `twisted.internet.process.PTYProcess`

Setup the child process. Override in subclasses.