Package logilab :: Package common :: Module daemon
[frames] | no frames]

Module daemon

source code

A daemonize function (for Unices) and daemon mix-in class

Classes
  DaemonMixIn
Mixin to make a daemon from watchers/queriers.
Functions
 
daemonize(pidfile=None, uid=None, umask=077)
daemonize a Unix process.
source code
 
print_help(modconfig) source code
 
handle_option(modconfig, opt_name, opt_value, help_meth) source code
Variables
  L_OPTIONS = ["help", "log=", "delay=", 'no-detach']
  S_OPTIONS = 'hl:d:n'
Function Details

daemonize(pidfile=None, uid=None, umask=077)

source code 
daemonize a Unix process. Set paranoid umask by default.

Return 1 in the original process, 2 in the first fork, and None for the
second fork (eg daemon process).