From 1f5ff38778862dfbf8b878f9c1dbc89b6764ee65 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 9 Jul 2002 04:37:13 +0000 Subject: * debug.cc: Avoid explicit zeroing of globals. (lock_debug): Make locker a static member. Avoid unlocking when already unlocked (from Conrad Scott). (debug_init): Initialize lock_debug::locker here. * fork.cc (fork_child): Fix up fdtab earlier to avoid some (but not all) confusion with close-on-exec craziness. --- winsup/cygwin/fork.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index e6fb91037..e25bc478c 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -243,7 +243,6 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls) } sync_with_parent ("after longjmp.", TRUE); - ProtectHandle (hParent); sigproc_printf ("hParent %p, child 1 first_dll %p, load_dlls %d\n", hParent, first_dll, load_dlls); @@ -275,9 +274,11 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls) MALLOC_CHECK; + cygheap->fdtab.fixup_after_fork (hParent); + ProtectHandle (hParent); + debug_fixup_after_fork (); pinfo_fixup_after_fork (); - cygheap->fdtab.fixup_after_fork (hParent); signal_fixup_after_fork (); MALLOC_CHECK; -- cgit v1.2.3