Use instead of popen to perform cleanup of orphan subprocesses. More...
Public Member Functions | |
| def | __init__ |
| def | __enter__ |
| Return the subprocess. More... | |
| def | __exit__ |
| def | kill_orphans |
| def | is_orphan |
| Returns tuple (pid, cmdline-list) of orphan or (None, None) More... | |
| def | kill_orphan |
| Try to kill orphan nicely first, if non-responding kill it hard. More... | |
| def | __init__ |
| def | __enter__ |
| Return the subprocess. More... | |
| def | __exit__ |
| def | kill_orphans |
| def | is_orphan |
| Returns tuple (pid, cmdline-list) of orphan or (None, None) More... | |
| def | kill_orphan |
| Try to kill orphan nicely first, if non-responding kill it hard. More... | |
Public Attributes | |
| pgid | |
| subproc | |
Use instead of popen to perform cleanup of orphan subprocesses.
Arguments are exactly like popen.
This is done by tracing the processes using a unique environment variable.
| def etr.tools.subprocess.KillOrphansContextManager.__init__ | ( | self, | |
| args, | |||
| kwargs | |||
| ) |
| def etr.tools.subprocess.KillOrphansContextManager.__init__ | ( | self, | |
| args, | |||
| kwargs | |||
| ) |
| def etr.tools.subprocess.KillOrphansContextManager.__enter__ | ( | self | ) |
Return the subprocess.
| def etr.tools.subprocess.KillOrphansContextManager.__enter__ | ( | self | ) |
Return the subprocess.
| def etr.tools.subprocess.KillOrphansContextManager.__exit__ | ( | self, | |
| type_, | |||
| value, | |||
| traceback | |||
| ) |
| def etr.tools.subprocess.KillOrphansContextManager.__exit__ | ( | self, | |
| type_, | |||
| value, | |||
| traceback | |||
| ) |
| def etr.tools.subprocess.KillOrphansContextManager.is_orphan | ( | self, | |
| pid_dir | |||
| ) |
Returns tuple (pid, cmdline-list) of orphan or (None, None)
| def etr.tools.subprocess.KillOrphansContextManager.is_orphan | ( | self, | |
| pid_dir | |||
| ) |
Returns tuple (pid, cmdline-list) of orphan or (None, None)
| def etr.tools.subprocess.KillOrphansContextManager.kill_orphan | ( | self, | |
| pid | |||
| ) |
Try to kill orphan nicely first, if non-responding kill it hard.
| def etr.tools.subprocess.KillOrphansContextManager.kill_orphan | ( | self, | |
| pid | |||
| ) |
Try to kill orphan nicely first, if non-responding kill it hard.
| def etr.tools.subprocess.KillOrphansContextManager.kill_orphans | ( | self | ) |
| def etr.tools.subprocess.KillOrphansContextManager.kill_orphans | ( | self | ) |
| etr.tools.subprocess.KillOrphansContextManager.pgid |
| etr.tools.subprocess.KillOrphansContextManager.subproc |
1.8.5