* sigproc.cc (child_info_spawn::reattach_children): Clean up handle when can't

open parent process or suffer handle leak.
This commit is contained in:
Christopher Faylor 2011-11-04 16:52:43 +00:00
parent f4bb53c4e0
commit 705d704153
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-11-04 Christopher Faylor <me.cygwin2011@cgf.cx>
* sigproc.cc (child_info_spawn::reattach_children): Clean up handle
when can't open parent process or suffer handle leak.
2011-11-03 Christopher Faylor <me.cygwin2011@cgf.cx> 2011-11-03 Christopher Faylor <me.cygwin2011@cgf.cx>
* sigproc.cc (child_info::sync): Report on exit code in strace output. * sigproc.cc (child_info::sync): Report on exit code in strace output.

View File

@ -868,6 +868,8 @@ child_info_spawn::reattach_children ()
children[i].rd_proc_pipe); children[i].rd_proc_pipe);
else if ((p.hProcess = OpenProcess (PROCESS_QUERY_INFORMATION, false, p->pid))) else if ((p.hProcess = OpenProcess (PROCESS_QUERY_INFORMATION, false, p->pid)))
p.reattach (); p.reattach ();
else
CloseHandle (p.rd_proc_pipe);
} }
} }