t.i.i.IProcessTransport(ITransport) : interface documentation

Part of twisted.internet.interfaces View Source View In Hierarchy

Known implementations: twisted.internet._dumbwin32proc.Process

A process transport.
Attribute pid From before IProcessProtocol.makeConnection is called to before IProcessProtocol.processEnded is called, pid is an int giving the platform process ID of this process. pid is None at all other times.
Method closeStdin Close stdin after all data has been written out.
Method closeStdout Close stdout.
Method closeStderr Close stderr.
Method closeChildFD Close a file descriptor which is connected to the child process, identified by its FD in the child process.
Method writeToChild Similar to ITransport.write but also allows the file descriptor in the child process which will receive the bytes to be specified.
Method loseConnection Close stdin, stderr and stdout.
Method signalProcess Send a signal to the process.

Inherited from ITransport:

Method write Write some data to the physical connection, in sequence, in a non-blocking fashion.
Method writeSequence Write a list of strings to the physical connection.
Method getPeer Get the remote address of this connection.
Method getHost Similar to getPeer, but returns an address describing this side of the connection.
pid =
From before IProcessProtocol.makeConnection is called to before IProcessProtocol.processEnded is called, pid is an int giving the platform process ID of this process. pid is None at all other times.
def closeStdin(): (source)
Close stdin after all data has been written out.
def closeStdout(): (source)
Close stdout.
def closeStderr(): (source)
Close stderr.
def closeChildFD(descriptor): (source)
Close a file descriptor which is connected to the child process, identified by its FD in the child process.
def writeToChild(childFD, data): (source)

Similar to ITransport.write but also allows the file descriptor in the child process which will receive the bytes to be specified.

This is not available on all platforms.
ParameterschildFDThe file descriptor to which to write. (type: int )
dataThe bytes to write. (type: str )
ReturnsNone
def loseConnection(): (source)
Close stdin, stderr and stdout.
def signalProcess(signalID): (source)
Send a signal to the process.
ParameterssignalIDcan be
  • one of "HUP", "KILL", "STOP", or "INT". These will be implemented in a cross-platform manner, and so should be used if possible.
  • an integer, where it represents a POSIX signal ID.
Raisestwisted.internet.error.ProcessExitedAlreadyThe process has already exited.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.