Table of Contents

Class: Process Twisted-0.17.4/twisted/internet/process.py

An operating-system Process.

This represents an operating-system process with standard input, standard output, and standard error streams connected to it.

On UNIX, this is implemented using fork(), exec(), pipe() and fcntl(). These calls may not exist elsewhere so this code is not cross-platform. (also, windows can only select on sockets...)

Base Classes   
abstract.FileDescriptor
styles.Ephemeral
Methods   
__init__
closeStdin
connectionLost
doError
doRead
doWrite
fileno
write
  __init__ 
__init__ (
        self,
        command,
        args,
        environment,
        path,
        )

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

  closeStdin 
closeStdin ( self )

Call this to close standard input on this process.

  connectionLost 
connectionLost ( self )

I call this to clean up when one or all of my connections has died.

  doError 
doError ( self )

Called when my standard error stream is ready for reading.

  doRead 
doRead ( self )

Called when my standard output stream is ready for reading.

  doWrite 
doWrite ( self )

Called when my standard output stream is ready for writing.

This will only happen in the case where the pipe to write to is broken.

  fileno 
fileno ( self )

This returns the file number of standard output on this process.

  write 
write ( self,  data )

Call this to write to standard input on this process.


Table of Contents

This document was automatically generated on Sat Apr 20 01:30:49 2002 by HappyDoc version 2.0