IcsUtils.Daemon Common Library

Daemon: Library for Daemon

This is the Daemon common library.
class opslib.icsutils.daemon.Daemon(pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null')[source]

A generic daemon class.

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

__init__(pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null')[source]
__module__ = 'opslib.icsutils.daemon'
daemonize()[source]

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

delpid()[source]
restart()[source]

Restart the daemon

run()[source]

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

start()[source]

Start the daemon

stop()[source]

Stop the daemon

Indices and tables

Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.