manoj 99/07/21 15:32:37
Modified: mpm/src/modules/mpm/mpmt_pthread mpmt_pthread.c Log: Fix silly bug. accept() has to be inside the accept mutexed block. doh. Revision Changes Path 1.11 +10 -4 apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c Index: mpmt_pthread.c =================================================================== RCS file: /home/cvs/apache-2.0/mpm/src/modules/mpm/mpmt_pthread/mpmt_pthread.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -u -r1.10 -r1.11 --- mpmt_pthread.c 1999/07/18 21:37:31 1.10 +++ mpmt_pthread.c 1999/07/21 22:32:36 1.11 @@ -950,10 +950,16 @@ } } got_fd: - SAFE_ACCEPT(accept_mutex_off(0)); - SAFE_ACCEPT(intra_mutex_off(0)); - if (workers_may_exit) break; - csd = ap_accept(sd, &sa_client, &len); + if (!workers_may_exit) { + csd = ap_accept(sd, &sa_client, &len); + SAFE_ACCEPT(accept_mutex_off(0)); + SAFE_ACCEPT(intra_mutex_off(0)); + } + else { + SAFE_ACCEPT(accept_mutex_off(0)); + SAFE_ACCEPT(intra_mutex_off(0)); + break; + } process_socket(ptrans, &sa_client, csd, process_slot, thread_slot); ap_clear_pool(ptrans); requests_this_child--;