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 2342d86951
commit a80cb81604

View File

@ -607,6 +607,17 @@ ngx_event_process_init(ngx_cycle_t *cycle)
ngx_use_accept_mutex = 0; 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) #if (NGX_THREADS)
ngx_posted_events_mutex = ngx_mutex_init(cycle->log, 0); ngx_posted_events_mutex = ngx_mutex_init(cycle->log, 0);
if (ngx_posted_events_mutex == NULL) { if (ngx_posted_events_mutex == NULL) {