diff src/os/unix/ngx_process.c @ 306:6b91bfbc4123

nginx-0.0.3-2004-04-05-00:32:09 import
author Igor Sysoev <igor@sysoev.ru>
date Sun, 04 Apr 2004 20:32:09 +0000
parents b79f021a644a
children 56496082668b
line wrap: on
line diff
--- 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 = "";