Package buildslave :: Module runprocess :: Class RunProcess
[frames] | no frames]

Class RunProcess

source code

This is a helper class, used by slave commands to run programs in a child shell.

Instance Methods
 
__init__(self, builder, command, workdir, environ=None, sendStdout=True, sendStderr=True, sendRC=True, timeout=None, maxTime=None, initialStdin=None, keepStdout=False, keepStderr=False, logEnviron=True, logfiles={}, usePTY='slave-config', useProcGroup=True) source code
 
__repr__(self) source code
 
sendStatus(self, status) source code
 
start(self) source code
 
addStdout(self, data) source code
 
addStderr(self, data) source code
 
addLogfile(self, name, data) source code
 
finished(self, sig, rc) source code
 
failed(self, why) source code
 
doTimeout(self) source code
 
doMaxTimeout(self) source code
 
kill(self, msg) source code
 
doBackupTimeout(self) source code
Class Variables
  notreally = False
  BACKUP_TIMEOUT = 5
  interruptSignal = 'KILL'
  CHUNK_LIMIT = 131072
  BUFFER_SIZE = 65536
  BUFFER_TIMEOUT = 5
  startTime = None
hash(x)
  elapsedTime = None
hash(x)
Method Details

__init__(self, builder, command, workdir, environ=None, sendStdout=True, sendStderr=True, sendRC=True, timeout=None, maxTime=None, initialStdin=None, keepStdout=False, keepStderr=False, logEnviron=True, logfiles={}, usePTY='slave-config', useProcGroup=True)
(Constructor)

source code 
Parameters:
  • keepStdout - if True, we keep a copy of all the stdout text that we've seen. This copy is available in self.stdout, which can be read after the command has finished.
  • keepStderr - same, for stderr
  • usePTY - "slave-config" -> use the SlaveBuilder's usePTY; otherwise, true to use a PTY, false to not use a PTY.
  • useProcGroup - (default True) use a process group for non-PTY process invocations