Class t.i.p.PTYProcess(abstract.FileDescriptor, styles.Ephemeral):

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

An operating-system Process that uses PTY support.
Method __init__ Spawn an operating-system process.
Method reapProcess Try to reap a process (without blocking) via waitpid.
Method closeStdin Undocumented
Method closeStdout Undocumented
Method closeStderr Undocumented
Method signalProcess Undocumented
Method processEnded Undocumented
Method doRead Called when my standard output stream is ready for reading.
Method fileno This returns the file number of standard output on this process.
Method maybeCallProcessEnded Undocumented
Method connectionLost I call this to clean up when one or all of my connections has died.
Method writeSomeData Write some data to the open process.
Method __repr__ Undocumented

Inherited from FileDescriptor:

Method doWrite Called when data can be written.
Method _postLoseConnection Called after a loseConnection(), when all data has been written.
Method _closeWriteConnection Undocumented
Method writeConnectionLost Indicates write connection was lost.
Method readConnectionLost Indicates read connection was lost.
Method write Reliably write some data.
Method writeSequence Reliably write a sequence of data.
Method loseConnection Close the connection at the next available opportunity.
Method loseWriteConnection Undocumented
Method stopReading Stop waiting for read availability.
Method stopWriting Stop waiting for write availability.
Method startReading Start waiting for read availability.
Method startWriting Start waiting for write availability.
Method registerProducer Register to receive data from a producer.
Method unregisterProducer Stop consuming data from a producer, without disconnecting.
Method stopConsuming Stop consuming data.
Method resumeProducing Undocumented
Method pauseProducing Undocumented
Method stopProducing Stop producing data.

Inherited from Logger (via FileDescriptor):

Method logPrefix Override this method to insert custom logging behavior. Its

Inherited from Ephemeral (via FileDescriptor):

Method __getstate__ Undocumented
Method __setstate__ Undocumented

Inherited from Ephemeral:

Method __getstate__ Undocumented
Method __setstate__ Undocumented
def __init__(self, reactor, command, args, environment, path, proto, uid=None, gid=None, usePTY=None): (source)

Spawn an operating-system process.

This is where the hard work of disconnecting all currently open files / forking / executing the new process happens. (This is executed automatically when a Process is instantiated.)

This will also run the subprocess as a given user ID and group ID, if specified. (Implementation Note: this doesn't support all the arcane nuances of setXXuid on UNIX: it will assume that either your effective or real UID is 0.)
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 closeStdin(self): (source)
Undocumented
def closeStdout(self): (source)
Undocumented
def closeStderr(self): (source)
Undocumented
def signalProcess(self, signalID): (source)
Undocumented
def processEnded(self, status): (source)
Undocumented
def doRead(self): (source)
Called when my standard output stream is ready for reading.
def fileno(self): (source)
This returns the file number of standard output on this process.
def maybeCallProcessEnded(self): (source)
Undocumented
def connectionLost(self, reason): (source)
I call this to clean up when one or all of my connections has died.
def writeSomeData(self, data): (source)
Write some data to the open process.
def __repr__(self): (source)
Undocumented
API Documentation for twisted, generated by pydoctor.