1 #include <ccan/daemonize/daemonize.h>
7 /* This code is based on Stevens Advanced Programming in the UNIX
13 /* Separate from our parent via fork, so init inherits us. */
14 if ((pid = fork()) < 0)
19 /* Don't hold files open. */
24 /* Session leader so ^C doesn't whack us. */
26 /* Move off any mount points we might be in. */
28 /* Discard our parent's old-fashioned umask prejudices. */