Package cherrypy :: Package process :: Module plugins :: Class Daemonizer
[hide private]
[frames] | no frames]

Class Daemonizer

source code

  object --+    
           |    
SimplePlugin --+
               |
              Daemonizer

Daemonize the running script.

Use this with a Web Site Process Bus via:

   Daemonizer(bus).subscribe()

When this component finishes, the process is completely decoupled from the parent environment. Please note that when this component is used, the return code from the parent process will still be 0 if a startup error occurs in the forked children. Errors in the initial daemonizing process still return proper exit codes. Therefore, if you use this plugin to daemonize, don't use the return code as an accurate indicator of whether the process fully started. In fact, that return code only indicates if the process succesfully finished the first fork.

Instance Methods [hide private]
 
__init__(self, bus, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null')
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
start(self) source code

Inherited from SimplePlugin: subscribe, unsubscribe

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from SimplePlugin: bus

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, bus, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null')
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)