diff options
author | Christopher Faylor <me@cgf.cx> | 2012-03-19 16:51:30 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-03-19 16:51:30 +0000 |
commit | d9492ab8d2d7aa90f6ac0fe2928e001c5a4f01fa (patch) | |
tree | 1d75ffe323160c53ca8b3898183eb971e5037e88 | |
parent | 4aeaedf961029e38cd9c97ac1e32ba91406c9e23 (diff) | |
download | cygnal-d9492ab8d2d7aa90f6ac0fe2928e001c5a4f01fa.tar.gz cygnal-d9492ab8d2d7aa90f6ac0fe2928e001c5a4f01fa.tar.bz2 cygnal-d9492ab8d2d7aa90f6ac0fe2928e001c5a4f01fa.zip |
* pinfo.cc (pinfo::wait): Handle case where prefork was not called prior to
calling wait(). This is the case when we are reabsorbing processes after being
execed.
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/pinfo.cc | 13 |
2 files changed, 14 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ebcf00afd..3c25957d1 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2012-03-19 Christopher Faylor <me.cygwin2012@cgf.cx> + + * pinfo.cc (pinfo::wait): Handle case where prefork was not called + prior to calling wait(). This is the case when we are reabsorbing + processes after being execed. + 2012-03-16 Christopher Faylor <me.cygwin2012@cgf.cx> * fork.cc (lock_signals): Move to sigproc.h. diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index c5e646455..bc0de4735 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -987,12 +987,15 @@ proc_waiter (void *arg) bool pinfo::wait () { - rd_proc_pipe = pending_rd_proc_pipe; - pending_rd_proc_pipe = NULL; + if (pending_rd_proc_pipe) + { + rd_proc_pipe = pending_rd_proc_pipe; + pending_rd_proc_pipe = NULL; - wr_proc_pipe () = pending_wr_proc_pipe; - ForceCloseHandle1 (pending_wr_proc_pipe, wr_proc_pipe); - pending_wr_proc_pipe = NULL; + wr_proc_pipe () = pending_wr_proc_pipe; + ForceCloseHandle1 (pending_wr_proc_pipe, wr_proc_pipe); + pending_wr_proc_pipe = NULL; + } preserve (); /* Preserve the shared memory associated with the pinfo */ |