comparison src/event/ngx_event.c @ 5275:1b70200d83e3 stable-1.4

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 31 May 2013 14:59:26 +0400
parents a29c574d61fa
children 11599a3d0c7c
comparison
equal deleted inserted replaced
5274:f06bbc08e457 5275:1b70200d83e3
605 605
606 } else { 606 } else {
607 ngx_use_accept_mutex = 0; 607 ngx_use_accept_mutex = 0;
608 } 608 }
609 609
610 #if (NGX_WIN32)
611
612 /*
613 * disable accept mutex on win32 as it may cause deadlock if
614 * grabbed by a process which can't accept connections
615 */
616
617 ngx_use_accept_mutex = 0;
618
619 #endif
620
610 #if (NGX_THREADS) 621 #if (NGX_THREADS)
611 ngx_posted_events_mutex = ngx_mutex_init(cycle->log, 0); 622 ngx_posted_events_mutex = ngx_mutex_init(cycle->log, 0);
612 if (ngx_posted_events_mutex == NULL) { 623 if (ngx_posted_events_mutex == NULL) {
613 return NGX_ERROR; 624 return NGX_ERROR;
614 } 625 }