* 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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user