delphyne_gui
|
Launch and manage a group of processes. If one exits, all the rest are killed. The aggregate return code is that of whichever one exited first. Any process output to stdout or stderr is echoed to the stdout of this script, prefixed by process-specific labels.
Public Member Functions | |
def | __init__ (self) |
def | launch (self, command, label=None, cwd=None, environ=None) |
def | wait (self, duration) |
def | kill (self) |
def | terminate (self) |
Public Attributes | |
children | |
devnull | |
returncode | |
done | |
name | |
def __init__ | ( | self | ) |
def kill | ( | self | ) |
Kill any still-running managed processes.
def launch | ( | self, | |
command, | |||
label = None , |
|||
cwd = None , |
|||
environ = None |
|||
) |
Launch a process to be managed with the group. If no label is supplied, a label is synthesized from the supplied command line.
def terminate | ( | self | ) |
Terminates all managed processes. This avoids the launcher to print the exit code of a process that was killed by himself.
def wait | ( | self, | |
duration | |||
) |
Wait for any of the managed processes to exit, for a keyboard interrupt from the user, or for the specified duration to expire. Print a message explaining which event occurred. Set the return code as that of the first-exiting process, or 0 for keyboard interrupt or timeout.
children |
devnull |
done |
name |
returncode |