summaryrefslogtreecommitdiffhomepage
path: root/src/os
diff options
context:
space:
mode:
Diffstat (limited to 'src/os')
-rw-r--r--src/os/unix/ngx_process.c13
-rw-r--r--src/os/win32/ngx_process_cycle.c2
2 files changed, 15 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 = "";
diff --git a/src/os/win32/ngx_process_cycle.c b/src/os/win32/ngx_process_cycle.c
index 1b8f18629..ab387d458 100644
--- a/src/os/win32/ngx_process_cycle.c
+++ b/src/os/win32/ngx_process_cycle.c
@@ -16,6 +16,8 @@ sig_atomic_t ngx_timer;
#endif
+ngx_int_t ngx_threaded;
+
sig_atomic_t ngx_terminate;
sig_atomic_t ngx_quit;