/* If daemonization is configured, then this function notifies the parent * process that the child process has completed startup successfully. It also * call daemonize_post_detach(). * * Calling this function more than once has no additional effect. */ void daemonize_complete(void) { if (!detached) { detached = true; fork_notify_startup(daemonize_fd); daemonize_fd = -1; daemonize_post_detach(); } }
/* If daemonization is configured, then this function notifies the parent * process that the child process has completed startup successfully. It also * call daemonize_post_detach(). * * Calling this function more than once has no additional effect. */ void daemonize_complete(void) { if (pidfile) { free(pidfile); pidfile = NULL; } if (!detached) { detached = true; fork_notify_startup(daemonize_fd); daemonize_fd = -1; daemonize_post_detach(); } }