aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-10-31 02:03:00 +0000
committerChristopher Faylor <me@cgf.cx>2001-10-31 02:03:00 +0000
commit0fc07e4d6979ddde53a1c070408b037dca6719c5 (patch)
tree4cec727087fe87c625950a069e42af9a97ca2e7d
parent6ea0c04e7ca613dbf28b5f913fe2d6f84ee7cbfc (diff)
downloadnewlib-0fc07e4d6979ddde53a1c070408b037dca6719c5.zip
newlib-0fc07e4d6979ddde53a1c070408b037dca6719c5.tar.gz
newlib-0fc07e4d6979ddde53a1c070408b037dca6719c5.tar.bz2
* fhandler.cc (fhandler_base::fork_fixup): Pass old handle to setclexec_pid.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 98ac1d3..69f6495 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2001-10-30 Christopher Faylor <cgf@redhat.com>
+ * fhandler.cc (fhandler_base::fork_fixup): Pass old handle to
+ setclexec_pid.
+
+2001-10-30 Christopher Faylor <cgf@redhat.com>
+
* cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh.
(cygheap_fdmanip::isopen): New method.
* syscalls.cc (_read): Avoid accessing closed fd.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 682f4b7..9617790 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1644,7 +1644,7 @@ fhandler_base::fork_fixup (HANDLE parent, HANDLE &h, const char *name)
{
debug_printf ("%s success - oldh %p, h %p", get_name (), oh, h);
// someday, maybe ProtectHandle2 (h, name);
- setclexec_pid (h, h, !get_close_on_exec ());
+ setclexec_pid (oh, h, !get_close_on_exec ());
}
#endif
}