fixed destruction

This commit is contained in:
Roberto De Ioris
2014-11-16 21:00:35 +01:00
parent 14702977a4
commit 2b24f7b885
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -341,6 +341,7 @@ int uwsgi_master_check_daemons_death(int diedpid) {
int uwsgi_worker_is_busy(int wid) {
int i;
if (uwsgi.workers[uwsgi.mywid].sig) return 1;
for(i=0;i<uwsgi.cores;i++) {
if (uwsgi.workers[wid].cores[i].in_request) {
return 1;
+5
View File
@@ -862,6 +862,11 @@ static void uwsgi_perl_atexit() {
if (uwsgi.workers[uwsgi.mywid].hijacked)
goto destroyperl;
// if busy do not run atexit hooks (as this part could be called in a signal handler
// while a subroutine is running)
if (uwsgi_worker_is_busy(uwsgi.mywid))
return;
realstuff:
if (uperl.atexit) {