* child_info.h (child_info::postfork): Define new function.

* fork.cc (frok::parent): Call postfork to do all of the manipulation required
prior to calling pinfo::remember.
* pinfo.h (pinfo::set_rd_proc_pipe): Just set pinfo's rd_proc_pipe.  Don't
bother setting it to NULL.
* sigproc.cc (child_info_spawn::wait_for_myself): Call postfork to set up
myself for waiting.
* spawn.cc (child_info_spawn::worker): Avoid now-unnecessary global lock.
Consistently test mode rather than chtype when making wr_proc_pipe decisions.
Call postfork() to set up stuff prior to pinfo::remember.
This commit is contained in:
Christopher Faylor
2012-03-21 15:54:50 +00:00
parent 5a519b88fa
commit b7d95b5bb5
6 changed files with 28 additions and 12 deletions

View File

@@ -914,9 +914,7 @@ cygheap_exec_info::alloc ()
void
child_info_spawn::wait_for_myself ()
{
myself.set_rd_proc_pipe (rd_proc_pipe);
ForceCloseHandle (wr_proc_pipe);
wr_proc_pipe = NULL;
postfork (myself);
myself.remember (false);
WaitForSingleObject (ev, INFINITE);
}