From df246e149ebc68a6bd3c1c133762fbc7c4524e9c Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sat, 28 Sep 2013 19:14:25 +0000 Subject: [PATCH] Follow up to r1526666: Use SYNCHRONIZE instead of PROCESS_ALL_ACCESS because a. it is sufficient b. it avoids an issue where PROCESS_ALL_ACCESS is larger on newer SDKs, resulting in a run-time error when running on older Windows Close the handle. Submitted by: Ivan Zhakov git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1527220 13f79535-47bb-0310-9956-ffa450edef68 --- server/mpm/winnt/child.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/mpm/winnt/child.c b/server/mpm/winnt/child.c index 49b5c2be66..fe49b02ebc 100644 --- a/server/mpm/winnt/child.c +++ b/server/mpm/winnt/child.c @@ -985,11 +985,12 @@ void child_main(apr_pool_t *pconf, DWORD parent_pid) child_events[1] = max_requests_per_child_event; if (parent_pid != my_pid) { - child_events[2] = OpenProcess(PROCESS_ALL_ACCESS, FALSE, parent_pid); + child_events[2] = OpenProcess(SYNCHRONIZE, FALSE, parent_pid); num_events = 3; } else { /* presumably -DONE_PROCESS */ + child_events[2] = NULL; num_events = 2; } @@ -1318,6 +1319,9 @@ void child_main(apr_pool_t *pconf, DWORD parent_pid) apr_pool_destroy(pchild); CloseHandle(exit_event); + if (child_events[2] != NULL) { + CloseHandle(child_events[2]); + } } #endif /* def WIN32 */ -- 2.50.0