Package logilab :: Package common :: Module daemon

[frames] | no frames]

# Module daemon

source code

    A daemonize function (for Unices)

Functions

setugid(user) Change process user and group ID | source code

daemonize(pidfile=None, uid=None, umask=0o77) daemonize a Unix process. | source code

Function Details

### setugid(user)

source code

    Change process user and group ID

    Argument is a numeric user id or a user name

### daemonize(pidfile=None, uid=None, umask=0o77)

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).