* 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:
@@ -784,7 +784,7 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
||||
rc ? cygpid : (unsigned int) -1, prog_arg, one_line.buf);
|
||||
|
||||
/* Name the handle similarly to proc_subproc. */
|
||||
ProtectHandle (pi.hProcess);
|
||||
ProtectHandle1 (pi.hProcess, childhProc);
|
||||
|
||||
bool wait_for_myself = false;
|
||||
if (mode == _P_OVERLAY)
|
||||
@@ -802,7 +802,6 @@ spawn_guts (const char * prog_arg, const char *const *argv,
|
||||
this). */
|
||||
if (!myself->wr_proc_pipe)
|
||||
{
|
||||
myself.hProcess = pi.hProcess;
|
||||
myself.remember ();
|
||||
wait_for_myself = true;
|
||||
myself->wr_proc_pipe = INVALID_HANDLE_VALUE;
|
||||
@@ -855,8 +854,6 @@ if (wait_for_myself)
|
||||
else
|
||||
ciresrv.sync (myself, INFINITE);
|
||||
|
||||
ForceCloseHandle (pi.hProcess);
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case _P_OVERLAY:
|
||||
|
Reference in New Issue
Block a user