twisted.internet.interfaces.IProcessTransport(ITransport) interface documentationtwisted.internet.interfaces
(View In Hierarchy)
Known subclasses: twisted.internet.endpoints._IProcessTransportWithConsumerAndProducer
Known implementations: twisted.internet._dumbwin32proc.Process, twisted.internet.process.Process, twisted.internet.process.PTYProcess, twisted.internet.test.test_endpoints.MemoryProcessTransport
A process transport.
| Attribute | pid | From before IProcessProtocol.makeConnectionis called to beforeIProcessProtocol.processEndedis called,pidis anintgiving the platform process ID of this process.pidisNoneat 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.writebut 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 an iterable of byte 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. | 
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.
Close a file descriptor which is connected to the child process, identified by its FD in the child process.
Similar to ITransport.write
but also allows the file descriptor in the child process which will receive
the bytes to be specified.
| Parameters | childFD | The file descriptor to which to write. (type: int) | 
| data | The bytes to write. (type: bytes) | |
| Returns | None | |
| Raises | KeyError | If childFDis not a file descriptor that was mapped in the 
child whenIReactorProcess.spawnProcesswas used to create it. | 
Send a signal to the process.
| Parameters | signalID | can be 
 | 
| Raises | twisted.internet.error.ProcessExitedAlready | If the process has already exited. | 
| OSError | If the os.killcall fails with an errno different fromESRCH. |