diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 98ac1d364..69f649554 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2001-10-30 Christopher Faylor + + * fhandler.cc (fhandler_base::fork_fixup): Pass old handle to + setclexec_pid. + 2001-10-30 Christopher Faylor * cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh. 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 }