]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Win32: Protect another chunk of code unique to Windows NT with an
authorBill Stoddard <stoddard@apache.org>
Fri, 14 Apr 2000 16:48:45 +0000 (16:48 +0000)
committerBill Stoddard <stoddard@apache.org>
Fri, 14 Apr 2000 16:48:45 +0000 (16:48 +0000)
ap_oslevel check.

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

server/mpm/winnt/mpm_winnt.c

index 0974be9b336764c61004474507eea93b4b0d6e79..740894af6191b4013a6f3bbd214c9d0938ba6e99 100644 (file)
@@ -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);