diff options
Diffstat (limited to 'src/os/unix/ngx_process.c')
-rw-r--r-- | src/os/unix/ngx_process.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/os/unix/ngx_process.c b/src/os/unix/ngx_process.c index d49ba3258..8736da781 100644 --- a/src/os/unix/ngx_process.c +++ b/src/os/unix/ngx_process.c @@ -1,6 +1,7 @@ #include <ngx_config.h> #include <ngx_core.h> +#include <ngx_event.h> static void ngx_execute_proc(ngx_cycle_t *cycle, void *data); @@ -142,6 +143,18 @@ void ngx_process_get_status() return; } + + if (ngx_accept_mutex_ptr) { + + /* + * unlock the accept mutex if the abnormally exited process + * held it + */ + + ngx_atomic_cmp_set(ngx_accept_mutex_ptr, pid, 0); + } + + one = 1; process = ""; |