* fhandler.cc (fhandler_base::fork_fixup): Pass old handle to setclexec_pid.

This commit is contained in:
Christopher Faylor 2001-10-31 02:03:00 +00:00
parent 6ea0c04e7c
commit 0fc07e4d69
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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> 2001-10-30 Christopher Faylor <cgf@redhat.com>
* cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh. * cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh.

View 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); debug_printf ("%s success - oldh %p, h %p", get_name (), oh, h);
// someday, maybe ProtectHandle2 (h, name); // someday, maybe ProtectHandle2 (h, name);
setclexec_pid (h, h, !get_close_on_exec ()); setclexec_pid (oh, h, !get_close_on_exec ());
} }
#endif #endif
} }