Package linspector :: Package lib :: Package core :: Module daemon :: Class Daemon
[hide private]
[frames] | no frames]

Class Daemon

source code

Known Subclasses:

A generic daemon class.

Usage: subclass the Daemon class and override the run() method

Instance Methods [hide private]
 
__init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null') source code
 
daemonize(self)
do the UNIX double-fork magic, see Stevens' "Advanced Programming in the UNIX Environment" for details (ISBN 0201563177) http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16
source code
 
delpid(self) source code
 
start(self)
Start the daemon
source code
 
stop(self)
Stop the daemon
source code
 
restart(self)
Restart the daemon
source code
 
run(self)
You should override this method when you subclass Daemon.
source code
Method Details [hide private]

run(self)

source code 

You should override this method when you subclass Daemon. It will be called after the process has been daemonized by start() or restart().