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>2001-10-31 05:03:00 +0300
committerChristopher Faylor <me@cgf.cx>2001-10-31 05:03:00 +0300
commit0fc07e4d6979ddde53a1c070408b037dca6719c5 (patch)
tree4cec727087fe87c625950a069e42af9a97ca2e7d
parent6ea0c04e7ca613dbf28b5f913fe2d6f84ee7cbfc (diff)
* 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 98ac1d364..69f649554 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 682f4b715..9617790e2 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
}