From: Bill Stoddard Date: Fri, 14 Apr 2000 16:48:45 +0000 (+0000) Subject: Win32: Protect another chunk of code unique to Windows NT with an X-Git-Tag: apache-doc-split-01~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aa29af58e945095c68344a010db72a71205b7c8;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/server/mpm/winnt/mpm_winnt.c b/server/mpm/winnt/mpm_winnt.c index 0974be9b336..740894af619 100644 --- a/server/mpm/winnt/mpm_winnt.c +++ b/server/mpm/winnt/mpm_winnt.c @@ -1470,15 +1470,18 @@ 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); } - /* Now, send the AcceptEx completion port to the child */ - if (!DuplicateHandle(GetCurrentProcess(), AcceptExCompPort, - pi.hProcess, &hDupedCompPort, 0, - TRUE, DUPLICATE_SAME_ACCESS)) { - ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf, - "Parent: Unable to duplicate AcceptEx completion port. Shutting down."); - return -1; + if (osver.dwPlatformId != VER_PLATFORM_WIN32_WINDOWS) { + /* Now, send the AcceptEx completion port to the child */ + if (!DuplicateHandle(GetCurrentProcess(), AcceptExCompPort, + pi.hProcess, &hDupedCompPort, 0, + TRUE, DUPLICATE_SAME_ACCESS)) { + ap_log_error(APLOG_MARK, APLOG_CRIT, GetLastError(), server_conf, + "Parent: Unable to duplicate AcceptEx completion port. Shutting down."); + return -1; + } + + WriteFile(hPipeWrite, &hDupedCompPort, (DWORD) sizeof(hDupedCompPort), &BytesWritten, (LPOVERLAPPED) NULL); } - WriteFile(hPipeWrite, &hDupedCompPort, (DWORD) sizeof(hDupedCompPort), &BytesWritten, (LPOVERLAPPED) NULL); } CloseHandle(hPipeRead);