aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/fork.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2002-10-21 01:00:58 +0000
committerChristopher Faylor <me@cgf.cx>2002-10-21 01:00:58 +0000
commit5ec14fe40ae1a6b11d27b975feca1b20de435467 (patch)
tree568cd69f0dca513973fc6e6646fe6ea4b3b9dafe /winsup/cygwin/fork.cc
parentccefaab1d5735466b54f8c5dd279a310d6020a77 (diff)
downloadnewlib-5ec14fe40ae1a6b11d27b975feca1b20de435467.zip
newlib-5ec14fe40ae1a6b11d27b975feca1b20de435467.tar.gz
newlib-5ec14fe40ae1a6b11d27b975feca1b20de435467.tar.bz2
Change _function() to function() throughout.
* cygwin.din: Remove last vestiges (?) of newlib wrappers. * cygthread.cc (cygthread::detach): Always wait for event or suffer an apparently inavoidable race. * dcrt0.cc (dll_crt0_1): Allocate threads after stack has been relocated. * debub.cc (lock_debug): Don't acquire lock on exit. * fork.cc (fork_child): Recreate mmaps before doing anything else since Windows has a habit of using blocks of memory in the child that could previously have been occupied by shared memory in the parent. * mmap.cc (fhandler_disk_file::fixup_mmap_after_fork): Issue error here and provide some details about what went wrong. (fixup_mmaps_after_fork): Remove error message. * shared.cc (open_shared): Move warning message so that more detail is possible. * sigproc.cc (sigproc_init): Initialize sync_proc_subproc to avoid a race. (sigproc_terminate): Specifically wait for process thread to terminate.
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 4cac097..485bd17 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;
}