.TH daemonize 1 "November 2010" "ngtx" .SH NAME daemonize \- make a prog a daemon .SH SYNOPSIS .B daemonize /path/to/prog [args] .br .B daemonizep /path/to/prog [args] .SH DESCRIPTION Make a prog, shell- or other script a daemon. The new daemon will be a session leader with umask of 027, "/" as directory and standard file descriptors closed. .br .B daemonizep differs from .B daemonize by printing the PID of the daemonized prog. .br To avoid unnecessary library dependencies the binary was created with dietlibc (or nasm on daemonize and i386 arch). .SH "RETURN VALUE" The return value is 1 if forking failed otherwise 0. .SH EXAMPLES daemonize /tmp/loadlogger.py .SH CAVEATS Only the standard file descriptors for stdin, stdout and stderrr (0,1,2) are closed. .SH AUTHOR Frank Bergmann, http://www.tuxad.com