Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-12-06 03:29:41 +0300
committerChristopher Faylor <me@cgf.cx>2004-12-06 03:29:41 +0300
commit8c43a9f82e078662b70a1777f232edd7b37dfa02 (patch)
tree3b291a9542f6cf4ab3b13c76f0777e3023e7f4be /winsup/cygwin/fork.cc
parent013f043fff95d2f456f97b81cd3bd4ee02000cc0 (diff)
* fork.cc (fork_parent): Reinstate "childhProc" protection. Don't close
hProcess handle here since it is used to ensure that a new process isn't created with the old pid after the old pid exits. * spawn.cc (spawn_guts): Ditto. * pinfo.cc (proc_waiter): Don't send any signals if we've execed since this process doesn't officially exist. * pinfo.h (pinfo::pid_handle): Eliminate. Just use hProc. * sigproc.cc (sig_send): Don't send any signals if our sendsig doesn't exist. That's a sign that we are execing. (remove_proc): Eliminate pid_handle close.
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;