fixed destruction

This commit is contained in:
Roberto De Ioris
2014-11-16 20:59:45 +01:00
parent a86a1fcc40
commit 596c81124e
2 changed files with 6 additions and 0 deletions
+1
View File
@@ -335,6 +335,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
@@ -815,6 +815,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) {