ChromeController.exit_handler
index
/media/Scripts/ChromeController/ChromeController/exit_handler.py

Utility (Linux only) to ensure subprocesses exit when their parents do by sending
a specified signal when the parent dies.
 
Usage:
 
    subprocess.Popen(['some-executable'], preexec_fn=on_parent_exit('SIGHUP'))
 
Taken from https://gist.github.com/evansd/2346614,
http://evans.io/legacy/posts/killing-child-processes-on-parent-exit-prctl/

 
Modules
       
builtins
signal

 
Classes
       
builtins.Exception(builtins.BaseException)
PrCtlError

 
class PrCtlError(builtins.Exception)
    PrCtlError(*args, **keywords)
 

 
 
Method resolution order:
PrCtlError
builtins.Exception
builtins.BaseException
builtins.object

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Methods inherited from builtins.BaseException:
__init__(self, *args)
__reduce__(self)
__repr__(self)
__setstate__(self, dict)
__str__(self)
__unicode__(self)
with_traceback(self, traceback)

Static methods inherited from builtins.BaseException:
__new__(subtype, *args, **keywords)

Data descriptors inherited from builtins.BaseException:
__cause__
__context__
__dict__
__suppress_context__
__traceback__
args

 
Functions
       
on_parent_exit(signame)
Return a function to be run in a child process which will trigger SIGNAME
to be sent when the parent process dies

 
Data
        PR_SET_PDEATHSIG = 1
cdll = <ctypes.LibraryLoader object>