summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fork.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 422b191a9..770c6c225 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -402,7 +402,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
ProtectHandle (pi.hThread);
/* Protect the handle but name it similarly to the way it will
be called in subproc handling. */
- ProtectHandle (pi.hProcess);
+ ProtectHandle1 (pi.hProcess, childhProc);
/* Fill in fields in the child's process table entry. */
child->dwProcessId = pi.dwProcessId;
@@ -501,7 +501,6 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
(void) resume_child (forker_finished);
}
- ForceCloseHandle (pi.hProcess);
ForceCloseHandle (pi.hThread);
ForceCloseHandle (forker_finished);
forker_finished = NULL;