[nginx] Win32: accept_mutex now always disabled (ticket #362).
Maxim Dounin
mdounin at mdounin.ru
Tue Jul 16 11:41:26 UTC 2013
details: http://hg.nginx.org/nginx/rev/1b70200d83e3
branches: stable-1.4
changeset: 5275:1b70200d83e3
user: Maxim Dounin <mdounin at mdounin.ru>
date: Fri May 31 14:59:26 2013 +0400
description:
Win32: accept_mutex now always disabled (ticket #362).
Use of accept mutex on win32 may result in a deadlock if there are multiple
worker_processes configured and the mutex is grabbed by a process which
can't accept connections.
diffstat:
src/event/ngx_event.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diffs (21 lines):
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -607,6 +607,17 @@ ngx_event_process_init(ngx_cycle_t *cycl
ngx_use_accept_mutex = 0;
}
+#if (NGX_WIN32)
+
+ /*
+ * disable accept mutex on win32 as it may cause deadlock if
+ * grabbed by a process which can't accept connections
+ */
+
+ ngx_use_accept_mutex = 0;
+
+#endif
+
#if (NGX_THREADS)
ngx_posted_events_mutex = ngx_mutex_init(cycle->log, 0);
if (ngx_posted_events_mutex == NULL) {
More information about the nginx-devel
mailing list