1 #ifndef CCAN_DAEMONIZE_H
2 #define CCAN_DAEMONIZE_H
6 * daemonize - turn this process into a daemon.
8 * This routine forks us off to become a daemon. It returns false on failure
9 * (eg. fork(), chdir or open failed) and sets errno.
11 * Side effects for programmers to be aware of:
12 * - PID changes (our parent exits, we become child of init)
13 * - stdin and stdout file descriptors are closed
14 * - stderr is reopened to /dev/null so you don't reuse it
15 * - Current working directory changes to /
16 * - Umask is set to 0.
20 #endif /* CCAN_DAEMONIZE_H */