diff options
author | Christopher Faylor <me@cgf.cx> | 2012-03-21 19:54:50 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-03-21 19:54:50 +0400 |
commit | b7d95b5bb5d62be24509256b486dd34285490e04 (patch) | |
tree | 2b78b1d3efd8d67c3317469bc4dc9972062662f9 /winsup/cygwin/child_info.h | |
parent | 5a519b88fab85d6911abbdc019461e4a6190e704 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/child_info.h')
-rw-r--r-- | winsup/cygwin/child_info.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index 981222032..cfe1e46fc 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -35,7 +35,7 @@ enum child_status #define EXEC_MAGIC_SIZE sizeof(child_info) /* Change this value if you get a message indicating that it is out-of-sync. */ -#define CURR_CHILD_INFO_MAGIC 0x4a52da7eU +#define CURR_CHILD_INFO_MAGIC 0x10f103a4U #define NPROCS 256 @@ -82,10 +82,16 @@ public: bool saw_ctrl_c () const {return !!(flag & _CI_SAW_CTRL_C);} void prefork (bool = false); void cleanup (); + void postfork (pinfo& child) + { + ForceCloseHandle (wr_proc_pipe); + wr_proc_pipe = NULL; + child.set_rd_proc_pipe (rd_proc_pipe); + rd_proc_pipe = NULL; + } }; class mount_info; -class _pinfo; class child_info_fork: public child_info { |