rad  2.0.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
etr.tools.subprocess.KillOrphansContextManager Class Reference

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

Public Attributes

 pgid
 
 subproc
 

Detailed Description

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.

Constructor & Destructor Documentation

def etr.tools.subprocess.KillOrphansContextManager.__init__ (   self,
  args,
  kwargs 
)

Member Function Documentation

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.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_orphans (   self)

Member Data Documentation

etr.tools.subprocess.KillOrphansContextManager.pgid
etr.tools.subprocess.KillOrphansContextManager.subproc

The documentation for this class was generated from the following file: