mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-04 04:31:44 +00:00
fixed destruction
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user