From: William A. Rowe Jr Date: Thu, 4 Apr 2002 23:32:36 +0000 (+0000) Subject: Race condition one ... we were occasionally escaping all the way out to X-Git-Tag: 2.0.35~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7391ec91082f2ef8332c7061da3d09d5b46fa62f;p=thirdparty%2Fapache%2Fhttpd.git Race condition one ... we were occasionally escaping all the way out to 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 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 36a0eea34f6..de595bf1177 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -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 */