Skip to content
Snippets Groups Projects
Commit 15bb297f authored by Martin C Drohmann's avatar Martin C Drohmann Committed by Andy Green
Browse files

Revert changes in daemonize.c from commit 22d6f39e

parent 83a79ec3
No related branches found
No related tags found
No related merge requests found
......@@ -142,9 +142,20 @@ lws_daemonize(const char *_lock_path)
exit(9);
}
/* If we got a good PID, then we can exit the parent process. */
if (pid_daemon > 0)
exit(0);
/* If we got a good PID, then we can exit the parent process. */
if (pid_daemon > 0) {
/*
* Wait for confirmation signal from the child via
* SIGCHILD / USR1, or for two seconds to elapse
* (SIGALRM). pause() should not return.
*/
alarm(2);
pause();
/* should not be reachable */
exit(1);
}
/* At this point we are executing as the child process */
parent = getppid();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment