Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 4cac097b5..485bd17ea 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -278,12 +278,12 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
MALLOC_CHECK;
- cygheap->fdtab.fixup_after_fork (hParent);
- ProtectHandleINH (hParent);
-
if (fixup_mmaps_after_fork (hParent))
api_fatal ("recreate_mmaps_after_fork_failed");
+ cygheap->fdtab.fixup_after_fork (hParent);
+ ProtectHandleINH (hParent);
+
MALLOC_CHECK;
/* If we haven't dynamically loaded any dlls, just signal
@@ -305,7 +305,6 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
if (fixup_shms_after_fork ())
api_fatal ("recreate_shm areas after fork failed");
- cygthread::init ();
pinfo_fixup_after_fork ();
signal_fixup_after_fork ();
@@ -316,8 +315,8 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
if ((*t)->clear_on_fork ())
(*t)->set ();
- wait_for_sigthread ();
pthread::atforkchild ();
+ wait_for_sigthread ();
cygbench ("fork-child");
return 0;
}