From: William A. Rowe Jr Date: Thu, 4 Apr 2002 23:33:44 +0000 (+0000) Subject: Another, potential race. Assure we are allowing worker threads to finish X-Git-Tag: 2.0.35~30 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a140f23053375a9ed74a7f492ac9b0f7b9ebd98d;p=apache Another, potential race. Assure we are allowing worker threads to finish from the time we begin our shutdown exercise. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94438 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index de595bf117..a6b0850364 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1289,6 +1289,11 @@ static void child_main() */ shutdown_in_progress = 1; + /* Tell the worker threads they may exit when done handling + * a connection. + */ + workers_may_exit = 1; + /* Close the listening sockets. */ for (lr = ap_listeners; lr ; lr = lr->next) { apr_socket_close(lr->sd); @@ -1308,11 +1313,6 @@ static void child_main() "Child %d: Failure releasing the start mutex", my_pid); } - /* Tell the worker threads they may exit when done handling - * a connection. - */ - workers_may_exit = 1; - /* Shutdown the worker threads */ if (osver.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) { for (i = 0; i < nthreads; i++) {