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
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-10-29 19:19:34 +0400
committerChristopher Faylor <me@cgf.cx>2005-10-29 19:19:34 +0400
commitf02b22dcee17b7f533c99c59e48dfe0d58e2382e (patch)
treef37f26dc7a2801de0bdca2e10328fba3e9c58b05 /winsup
parentc85263884a9d3c3bb5b082504fc98fc2bdeb9741 (diff)
* 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.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/fork.cc10
-rwxr-xr-xwinsup/cygwin/gendef4
-rw-r--r--winsup/cygwin/sigproc.cc2
4 files changed, 18 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 06e821102..34d844ebe 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,14 @@
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>
+
* child_info.h (CHILD_INFO_MAGIC): Reset.
2005-10-24 Christopher Faylor <cgf@timesys.com>
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
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/gendef
index e743ebcfc..a12b024d3 100755
--- a/winsup/cygwin/gendef
+++ b/winsup/cygwin/gendef
@@ -114,7 +114,7 @@ __sigfe:
.global __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 %ebx
pushl %eax # don't clobber
@@ -131,7 +131,7 @@ __sigbe: # return here after cygwin syscall
xadd %eax,$tls::stackptr(%ebx) # and get pointer
xorl %edx,%edx
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::stacklock(%ebx) # release lock
popl %eax
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 5e1a2edee..a4a0dafc3 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1175,8 +1175,8 @@ wait_sig (VOID *)
proc_subproc (PROC_CLEARWAIT, 0);
if (pack.wakeup)
{
+ sigproc_printf ("signalling pack.wakeup %p", pack.wakeup);
SetEvent (pack.wakeup);
- sigproc_printf ("signalled %p", pack.wakeup);
}
if (pack.si.si_signo == __SIGEXIT)
break;