]> granicus.if.org Git - apache/commitdiff
Another, potential race. Assure we are allowing worker threads to finish
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 4 Apr 2002 23:33:44 +0000 (23:33 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 4 Apr 2002 23:33:44 +0000 (23:33 +0000)
  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

server/mpm/winnt/mpm_winnt.c

index de595bf117756da9521ed3bf2aa1dda20f33d4c6..a6b08503640523dec9af7b45c77589763184ea61 100644 (file)
@@ -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++) {