diff --git a/core/mule.c b/core/mule.c index 1a71708d..df18902e 100644 --- a/core/mule.c +++ b/core/mule.c @@ -41,6 +41,17 @@ void uwsgi_mule(int id) { uwsgi_error("prctl()"); } #endif + + signal(SIGALRM, SIG_IGN); + signal(SIGHUP, SIG_IGN); + signal(SIGINT, end_me); + signal(SIGTERM, end_me); + signal(SIGUSR1, SIG_IGN); + signal(SIGUSR2, SIG_IGN); + signal(SIGPIPE, SIG_IGN); + signal(SIGSTOP, SIG_IGN); + signal(SIGTSTP, SIG_IGN); + uwsgi.muleid = id; // avoid race conditions uwsgi.mules[id - 1].id = id; diff --git a/core/spooler.c b/core/spooler.c index 45cfeb02..0c0626de 100644 --- a/core/spooler.c +++ b/core/spooler.c @@ -97,8 +97,18 @@ pid_t spooler_start(struct uwsgi_spooler * uspool) { exit(1); } else if (pid == 0) { + + signal(SIGALRM, SIG_IGN); + signal(SIGHUP, SIG_IGN); + signal(SIGINT, end_me); + signal(SIGTERM, end_me); // USR1 will be used to wake up the spooler uwsgi_unix_signal(SIGUSR1, spooler_wakeup); + signal(SIGUSR2, SIG_IGN); + signal(SIGPIPE, SIG_IGN); + signal(SIGSTOP, SIG_IGN); + signal(SIGTSTP, SIG_IGN); + uwsgi.mywid = -1; uwsgi.mypid = getpid(); uspool->pid = uwsgi.mypid; diff --git a/core/uwsgi.c b/core/uwsgi.c index 48298b8a..ce6a3205 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -1058,6 +1058,7 @@ void uwsgi_nuclear_blast() { } void reap_them_all(int signum) { + uwsgi_log("aooo\n"); int i; // avoid reace condition in lazy mode