Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-11-04 20:52:43 +0400
committerChristopher Faylor <me@cgf.cx>2011-11-04 20:52:43 +0400
commit705d704153cf2352205b7f481473971f9eda8073 (patch)
treedca35fbfffe21c637ee051fddd9ca2a10329ed4f /winsup/cygwin/sigproc.cc
parentf4bb53c4e0a4f1b74c1373da19c8e27476804719 (diff)
* sigproc.cc (child_info_spawn::reattach_children): Clean up handle when can't
open parent process or suffer handle leak.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index dcb52733b..a3035d9ca 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -868,6 +868,8 @@ child_info_spawn::reattach_children ()
children[i].rd_proc_pipe);
else if ((p.hProcess = OpenProcess (PROCESS_QUERY_INFORMATION, false, p->pid)))
p.reattach ();
+ else
+ CloseHandle (p.rd_proc_pipe);
}
}