| Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
| None |
|
||
| None or string |
|
||
|
|||
max_fd_limit = 1024
|
|||
sandbox_capable = True
|
|||
fakeroot_capable = True
|
|||
_exithandlers = []
|
|||
spawned_pids =
|
|||
Imports: os, atexit, signal, sys, dump_traceback, BASH_BINARY, SANDBOX_BINARY, FAKEROOT_BINARY, CommandNotFound, resource
|
|||
Spawns a bash shell running a specific commands
|
Wrapper around atexit.register that is needed in order to track what is registered. For example, when portage restarts itself via os.execv, the atexit module does not work so we have to do it manually by calling the run_exitfuncs() function in this module. |
This should behave identically to the routine performed by the atexit module at exit time. It's only necessary to call this function when atexit will not work (because of os.execv, for example). |
Spawns a given command.
@param mycommand: the command to execute
@type mycommand: String or List (Popen style list)
@param env: A dict of Key=Value pairs for env variables
@type env: Dictionary
@param opt_name: an optional name for the spawn'd process (defaults to the binary name)
@type opt_name: String
@param fd_pipes: A dict of mapping for pipes, { '0': stdin, '1': stdout } for example
@type fd_pipes: Dictionary
@param returnpid: Return the Process IDs for a successful spawn.
NOTE: This requires the caller clean up all the PIDs, otherwise spawn will clean them.
@type returnpid: Boolean
@param uid: User ID to spawn as; useful for dropping privilages
@type uid: Integer
@param gid: Group ID to spawn as; useful for dropping privilages
@type gid: Integer
@param groups: Group ID's to spawn in: useful for having the process run in multiple group contexts.
@type groups: List
@param umask: An integer representing the umask for the process (see man chmod for umask details)
@type umask: Integer
@param logfile: name of a file to use for logging purposes
@type logfile: String
@param path_lookup: If the binary is not fully specified then look for it in PATH
@type path_lookup: Boolean
@param pre_exec: A function to be called with no arguments just prior to the exec call.
@type pre_exec: callable
logfile requires stdout and stderr to be assigned to this process (ie not pointed
somewhere else.)
|
Execute a given binary with options
|
Given a binary name, find the binary in PATH
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Sep 10 22:59:00 2008 | http://epydoc.sourceforge.net |