From 9a864bd8f87efd0fa23f552d4277475dd76bcea4 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Sun, 4 Apr 2004 20:32:09 +0000 Subject: nginx-0.0.3-2004-04-05-00:32:09 import --- src/os/unix/ngx_process.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/os/unix/ngx_process.c') 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 #include +#include 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 = ""; -- cgit v1.2.3