better re-fork management for daemons

This commit is contained in:
Unbit
2014-01-08 06:20:37 +01:00
parent 18fa1172db
commit d7bba38d7a
+3
View File
@@ -304,6 +304,9 @@ void uwsgi_spawn_daemon(struct uwsgi_daemon *ud) {
exit(1);
}
if (pid > 0) {
if (prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0)) {
uwsgi_error("uwsgi_spawn_daemon()/prctl()");
}
// block all signals
sigset_t smask;
sigfillset(&smask);