From f02b22dcee17b7f533c99c59e48dfe0d58e2382e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Sat, 29 Oct 2005 15:19:34 +0000 Subject: * fork.cc (frok::child): Change order of cleanup prior to return. (fork): Save more of the stack. * gendef: Fix some comments. * sigproc.cc (wait_sig): Clarify debug output. --- winsup/cygwin/fork.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 13cccba3e..4f481b0f8 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -244,15 +244,15 @@ frok::child (void *) ForceCloseHandle1 (fork_info->forker_finished, forker_finished); - _my_tls.fixup_after_fork (); sigproc_init (); pthread::atforkchild (); fixup_timers_after_fork (); - fixup_hooks_after_fork (); cygbench ("fork-child"); ld_preload (); + fixup_hooks_after_fork (); cygwin_finished_initializing = true; + _my_tls.fixup_after_fork (); return 0; } @@ -562,7 +562,10 @@ fork () grouped.first_dll = NULL; grouped.load_dlls = 0; + int res; void *esp; + int ischild; + __asm__ volatile ("movl %%esp,%0": "=r" (esp)); myself->set_has_pgid_children (); @@ -576,8 +579,7 @@ fork () } sig_send (NULL, __SIGHOLD); - int res; - int ischild = setjmp (grouped.ch.jmp); + ischild = setjmp (grouped.ch.jmp); if (!ischild) res = grouped.parent (esp); else -- cgit v1.2.3