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:
authorChristopher Faylor <me@cgf.cx>2001-09-09 07:34:36 +0400
committerChristopher Faylor <me@cgf.cx>2001-09-09 07:34:36 +0400
commite2ea684e4ecca39aae13d3cdcdcb12cf32621889 (patch)
treed5dcb4a9b1bfb8fe47b57de3ec380312e838c5a7 /winsup/cygwin/fork.cc
parentc12a96d12fb912d3da7e1b6d9e68decf7b45b335 (diff)
* fork.cc (fork_parent): Stop malloc activity while fork is in control of the
heap. * sigproc.cc (NZOMBIES): Rename from ZOMBIEMAX for clarity. (zombies): Revert to original behavior. Allocating zombie array resulted in performance hit. * winsup.h: Declare malloc lock routines.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index b72b441dc..3a63e3901 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -462,6 +462,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
char sa_buf[1024];
syscall_printf ("CreateProcess (%s, %s, 0, 0, 1, %x, 0, 0, %p, %p)",
myself->progname, myself->progname, c_flags, &si, &pi);
+ __malloc_lock (_reent_clib ());
cygheap_setup_for_child (&ch);
rc = CreateProcess (myself->progname, /* image to run */
myself->progname, /* what we send in arg0 */
@@ -557,6 +558,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
dll_data_start, dll_data_end,
dll_bss_start, dll_bss_end, NULL);
+ __malloc_unlock (_reent_clib ());
MALLOC_CHECK;
if (!rc)
goto cleanup;