diff --git a/core/mule.c b/core/mule.c index 0b972027..1540af7c 100644 --- a/core/mule.c +++ b/core/mule.c @@ -350,7 +350,7 @@ next: uwsgi_log_verbose("master sent signal %d to mule %d\n", uwsgi_signal, uwsgi.muleid); #endif if (uwsgi_signal_handler(uwsgi_signal)) { - uwsgi_log_verbose("error managing signal %d on mule %d\n", uwsgi_signal, uwsgi.mywid); + uwsgi_log_verbose("error managing signal %d on mule %d\n", uwsgi_signal, uwsgi.muleid); } // set the error condition len = -1; diff --git a/core/signal.c b/core/signal.c index 5657776b..3d161a0e 100644 --- a/core/signal.c +++ b/core/signal.c @@ -6,6 +6,8 @@ int uwsgi_signal_handler(uint8_t sig) { struct uwsgi_signal_entry *use = NULL; + uwsgi_log("WID = %d\n", uwsgi.mywid); + int pos = (uwsgi.mywid * 256) + sig; use = &uwsgi.shared->signal_table[pos]; diff --git a/core/spooler.c b/core/spooler.c index f79f6a42..3c723f3a 100644 --- a/core/spooler.c +++ b/core/spooler.c @@ -108,7 +108,6 @@ pid_t spooler_start(struct uwsgi_spooler * uspool) { signal(SIGSTOP, SIG_IGN); signal(SIGTSTP, SIG_IGN); - uwsgi.mywid = -1; uwsgi.mypid = getpid(); uspool->pid = uwsgi.mypid; // avoid race conditions !!! diff --git a/plugins/psgi/psgi_plugin.c b/plugins/psgi/psgi_plugin.c index 4ecfa551..7b2ad0d1 100644 --- a/plugins/psgi/psgi_plugin.c +++ b/plugins/psgi/psgi_plugin.c @@ -668,7 +668,7 @@ void uwsgi_perl_run_hook(SV *hook) { } static void uwsgi_perl_atexit() { - if (uwsgi.mywid == -1) goto realstuff; + if (uwsgi.mywid == 0) goto realstuff; // if hijacked do not run atexit hooks if (uwsgi.workers[uwsgi.mywid].hijacked) diff --git a/plugins/python/python_plugin.c b/plugins/python/python_plugin.c index 8c02617f..761a7b8e 100644 --- a/plugins/python/python_plugin.c +++ b/plugins/python/python_plugin.c @@ -290,7 +290,7 @@ void uwsgi_python_reset_random_seed() { void uwsgi_python_atexit() { - if (uwsgi.mywid == -1) goto realstuff; + if (uwsgi.mywid == 0) goto realstuff; // if hijacked do not run atexit hooks if (uwsgi.workers[uwsgi.mywid].hijacked)