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-05-20 05:19:20 +0400
committerChristopher Faylor <me@cgf.cx>2001-05-20 05:19:20 +0400
commit975d20834fc8cfd1cd1c6e92a76146bf3028b337 (patch)
tree5049fcfdd56444c9c95c119cef7b87b2923e3b59 /winsup/cygwin/fork.cc
parent69fb3121cee73eab915b4af32b84544f7675f629 (diff)
* fork.cc (fork_parent): Move atforkprepare call here.
(fork): From here.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 8f569c95c..42ce8ff71 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -307,7 +307,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
/* Initialize signal/process handling */
sigproc_init ();
- __pthread_atforkchild();
+ __pthread_atforkchild ();
cygbench ("fork-child");
return 0;
}
@@ -345,6 +345,9 @@ fork_parent (void *stack_here, HANDLE& hParent, dll *&first_dll,
DWORD rc;
PROCESS_INFORMATION pi = {0, NULL, 0, 0};
+ /* call the pthread_atfork prepare functions */
+ __pthread_atforkprepare ();
+
subproc_init ();
#ifdef DEBUGGING_NOTNEEDED
@@ -596,7 +599,7 @@ out:
ForceCloseHandle (forker_finished);
forker_finished = NULL;
pi.hThread = NULL;
- __pthread_atforkparent();
+ __pthread_atforkparent ();
return forked->pid;
@@ -640,9 +643,6 @@ fork ()
return -1;
}
- /* call the pthread_atfork prepare functions */
- __pthread_atforkprepare();
-
void *esp;
__asm ("movl %%esp,%0": "=r" (esp));