diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2002-04-05 01:33:44 +0200 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2002-04-05 01:33:44 +0200 |
commit | a140f23053375a9ed74a7f492ac9b0f7b9ebd98d (patch) | |
tree | 7cca068dc9fac073b264eb331fb2a1b18edeeb21 /server/mpm/winnt | |
parent | Race condition one ... we were occasionally escaping all the way out to (diff) | |
download | apache2-a140f23053375a9ed74a7f492ac9b0f7b9ebd98d.tar.xz apache2-a140f23053375a9ed74a7f492ac9b0f7b9ebd98d.zip |
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
Diffstat (limited to 'server/mpm/winnt')
-rw-r--r-- | server/mpm/winnt/mpm_winnt.c | 10 |
1 files changed, 5 insertions, 5 deletions
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++) { |