* cygheap.cc (cygheap_fixup_in_child): Attempt Win95 workaround.

* dtable.cc (dtable::dup_worker): Add debugging output.
(dtable::vfork_child_dup): Correctly set close_on_exec.
* fhandler.cc (fhandler_base::fork_fixup): Don't mess with handle if there is
no need to get it from the parent.
* fhandler_tty.cc (fhandler_tty_common::close): Add debugging output.
This commit is contained in:
Christopher Faylor
2001-07-21 03:20:01 +00:00
parent b34f1c9f7b
commit a7670c1e82
6 changed files with 25 additions and 7 deletions

View File

@ -1542,7 +1542,9 @@ fhandler_base::set_inheritance (HANDLE &h, int not_inheriting, const char *namep
void
fhandler_base::fork_fixup (HANDLE parent, HANDLE &h, const char *name)
{
if (!DuplicateHandle (parent, h, hMainProc, &h, 0, !get_close_on_exec (),
if (!get_close_on_exec ())
debug_printf ("handle %p already opened", h);
else if (!DuplicateHandle (parent, h, hMainProc, &h, 0, !get_close_on_exec (),
DUPLICATE_SAME_ACCESS))
system_printf ("%s - %E, handle %s<%p>", get_name (), name, h);
}