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.
This commit is contained in:
Maxim Dounin 2013-05-31 14:59:26 +04:00
parent 9695fa7bc8
commit 15a8682eb4
1 changed files with 11 additions and 0 deletions

View File

@ -607,6 +607,17 @@ ngx_event_process_init(ngx_cycle_t *cycle)
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) {