X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fdaemonize%2Fdaemonize.h;h=abff7cca3a8787673f54c6ff22d34d2da27edbbd;hp=cc425a49288ea7c65f5ac91a2e874a5bff1c52be;hb=a8b30ad4dcea31c68ca809d2a6e6e4c7c6c30398;hpb=75a2f5a4b855ba9efd9e6de954eb35fda633909e diff --git a/ccan/daemonize/daemonize.h b/ccan/daemonize/daemonize.h index cc425a49..abff7cca 100644 --- a/ccan/daemonize/daemonize.h +++ b/ccan/daemonize/daemonize.h @@ -6,11 +6,12 @@ * daemonize - turn this process into a daemon. * * This routine forks us off to become a daemon. It returns false on failure - * (ie. fork() failed) and sets errno. + * (eg. fork(), chdir or open failed) and sets errno. * * Side effects for programmers to be aware of: * - PID changes (our parent exits, we become child of init) - * - stdin, stdout and stderr file descriptors are closed + * - stdin and stdout file descriptors are closed + * - stderr is reopened to /dev/null so you don't reuse it * - Current working directory changes to / * - Umask is set to 0. */