]> granicus.if.org Git - apache/commitdiff
Race condition one ... we were occasionally escaping all the way out to
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 4 Apr 2002 23:32:36 +0000 (23:32 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 4 Apr 2002 23:32:36 +0000 (23:32 +0000)
  WSATerminate() before this thread picked up it's sleepy head to discover
  the world was gone beneath it on 1GHz+ CPU WinXP configurations.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94437 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/winnt/mpm_winnt.c

index 36a0eea34f62abe78abf3e3a092d850adf85ba2a..de595bf117756da9521ed3bf2aa1dda20f33d4c6 100644 (file)
@@ -961,6 +961,13 @@ static void winnt_accept(void *listen_socket)
             WaitForSingleObject(pCompContext->Overlapped.hEvent, INFINITE);
         }
 
+        /* ### There is a race condition here.  The mainline may hit 
+         * WSATerminate before this thread reawakens.  Look First.
+         */
+        if (shutdown_in_progress) {
+            break;
+        }
+
         /* Inherit the listen socket settings. Required for 
          * shutdown() to work 
          */