summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pinfo.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 23dc35e5c..5a4c74244 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2005-01-11 Christopher Faylor <cgf@timesys.com>
+ * pinfo.cc (pinfo::init): Don't close input handle on temporary (?)
+ failure.
+
+2005-01-11 Christopher Faylor <cgf@timesys.com>
+
* pinfo.h (_pinfo::set_exit_state): Declare new function.
(pinfo::exit): Move here from _pinfo::exit.
* sigproc.cc (child_info::sync): Use new function to set exitcode and
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 6d55dc464..689e10be0 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -230,7 +230,8 @@ pinfo::init (pid_t n, DWORD flag, HANDLE in_h)
else
{
debug_printf ("MapViewOfFileEx(%p, in_h %p) failed, %E", h, in_h);
- CloseHandle (h);
+ if (h != in_h)
+ CloseHandle (h);
}
if (i < 9)
continue;