Commit 9084652c authored by Bill Stoddard's avatar Bill Stoddard
Browse files

Win32: Protect another chunk of code unique to Windows NT with an

ap_oslevel check.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84964 13f79535-47bb-0310-9956-ffa450edef68
parent 7edd7652
Loading
Loading
Loading
Loading
+3 −0
Changes for server/mpm/winnt/mpm_winnt.c: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1470,6 +1470,7 @@ static int create_process(ap_pool_t *p, HANDLE *handles, HANDLE *events, int *pr
            ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_INFO, APR_SUCCESS, server_conf,
                         "Parent: BytesWritten = %d WSAProtocolInfo = %x20", BytesWritten, *lpWSAProtocolInfo);
        }
        if (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) {
            /* Now, send the AcceptEx completion port to the child */
            if (!DuplicateHandle(GetCurrentProcess(), AcceptExCompPort, 
                                 pi.hProcess, &hDupedCompPort,  0,
@@ -1478,8 +1479,10 @@ static int create_process(ap_pool_t *p, HANDLE *handles, HANDLE *events, int *pr
                             "Parent: Unable to duplicate AcceptEx completion port. Shutting down.");
                return -1;
            }

            WriteFile(hPipeWrite, &hDupedCompPort, (DWORD) sizeof(hDupedCompPort), &BytesWritten, (LPOVERLAPPED) NULL);
        }
    }

    CloseHandle(hPipeRead);
    CloseHandle(hPipeWrite);