* 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.
This commit is contained in:
parent
c85263884a
commit
f02b22dcee
|
@ -1,3 +1,12 @@
|
||||||
|
2005-10-29 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2005-10-29 Christopher Faylor <cgf@timesys.com>
|
2005-10-29 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* child_info.h (CHILD_INFO_MAGIC): Reset.
|
* child_info.h (CHILD_INFO_MAGIC): Reset.
|
||||||
|
|
|
@ -244,15 +244,15 @@ frok::child (void *)
|
||||||
|
|
||||||
ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
|
ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
|
||||||
|
|
||||||
_my_tls.fixup_after_fork ();
|
|
||||||
sigproc_init ();
|
sigproc_init ();
|
||||||
|
|
||||||
pthread::atforkchild ();
|
pthread::atforkchild ();
|
||||||
fixup_timers_after_fork ();
|
fixup_timers_after_fork ();
|
||||||
fixup_hooks_after_fork ();
|
|
||||||
cygbench ("fork-child");
|
cygbench ("fork-child");
|
||||||
ld_preload ();
|
ld_preload ();
|
||||||
|
fixup_hooks_after_fork ();
|
||||||
cygwin_finished_initializing = true;
|
cygwin_finished_initializing = true;
|
||||||
|
_my_tls.fixup_after_fork ();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,7 +562,10 @@ fork ()
|
||||||
grouped.first_dll = NULL;
|
grouped.first_dll = NULL;
|
||||||
grouped.load_dlls = 0;
|
grouped.load_dlls = 0;
|
||||||
|
|
||||||
|
int res;
|
||||||
void *esp;
|
void *esp;
|
||||||
|
int ischild;
|
||||||
|
|
||||||
__asm__ volatile ("movl %%esp,%0": "=r" (esp));
|
__asm__ volatile ("movl %%esp,%0": "=r" (esp));
|
||||||
|
|
||||||
myself->set_has_pgid_children ();
|
myself->set_has_pgid_children ();
|
||||||
|
@ -576,8 +579,7 @@ fork ()
|
||||||
}
|
}
|
||||||
|
|
||||||
sig_send (NULL, __SIGHOLD);
|
sig_send (NULL, __SIGHOLD);
|
||||||
int res;
|
ischild = setjmp (grouped.ch.jmp);
|
||||||
int ischild = setjmp (grouped.ch.jmp);
|
|
||||||
if (!ischild)
|
if (!ischild)
|
||||||
res = grouped.parent (esp);
|
res = grouped.parent (esp);
|
||||||
else
|
else
|
||||||
|
|
|
@ -114,7 +114,7 @@ __sigfe:
|
||||||
|
|
||||||
.global __sigbe
|
.global __sigbe
|
||||||
.stabs "_sigbe:F(0,1)",36,0,0,__sigbe
|
.stabs "_sigbe:F(0,1)",36,0,0,__sigbe
|
||||||
__sigbe: # return here after cygwin syscall
|
__sigbe: # return here after cygwin syscall
|
||||||
pushl %edx
|
pushl %edx
|
||||||
pushl %ebx
|
pushl %ebx
|
||||||
pushl %eax # don't clobber
|
pushl %eax # don't clobber
|
||||||
|
@ -131,7 +131,7 @@ __sigbe: # return here after cygwin syscall
|
||||||
xadd %eax,$tls::stackptr(%ebx) # and get pointer
|
xadd %eax,$tls::stackptr(%ebx) # and get pointer
|
||||||
xorl %edx,%edx
|
xorl %edx,%edx
|
||||||
xchgl %edx,-4(%eax) # get return address from signal stack
|
xchgl %edx,-4(%eax) # get return address from signal stack
|
||||||
xchgl %edx,8(%esp) # restore ebx/real return address
|
xchgl %edx,8(%esp) # restore edx/real return address
|
||||||
decl $tls::incyg(%ebx)
|
decl $tls::incyg(%ebx)
|
||||||
decl $tls::stacklock(%ebx) # release lock
|
decl $tls::stacklock(%ebx) # release lock
|
||||||
popl %eax
|
popl %eax
|
||||||
|
|
|
@ -1175,8 +1175,8 @@ wait_sig (VOID *)
|
||||||
proc_subproc (PROC_CLEARWAIT, 0);
|
proc_subproc (PROC_CLEARWAIT, 0);
|
||||||
if (pack.wakeup)
|
if (pack.wakeup)
|
||||||
{
|
{
|
||||||
|
sigproc_printf ("signalling pack.wakeup %p", pack.wakeup);
|
||||||
SetEvent (pack.wakeup);
|
SetEvent (pack.wakeup);
|
||||||
sigproc_printf ("signalled %p", pack.wakeup);
|
|
||||||
}
|
}
|
||||||
if (pack.si.si_signo == __SIGEXIT)
|
if (pack.si.si_signo == __SIGEXIT)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue