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.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;