OSDN Git Service

* fhandler.cc (fhandler_base::fork_fixup): Pass old handle to setclexec_pid.
authorcgf <cgf>
Wed, 31 Oct 2001 02:03:00 +0000 (02:03 +0000)
committercgf <cgf>
Wed, 31 Oct 2001 02:03:00 +0000 (02:03 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.cc

index 98ac1d3..69f6495 100644 (file)
@@ -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.
index 682f4b7..9617790 100644 (file)
@@ -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
 }