]> sourceware.org Git - newlib-cygwin.git/commitdiff
* cygtls.cc (_cygtls::fixup_after_fork): Just manipulate the signal stack if a
authorChristopher Faylor <me@cgf.cx>
Tue, 16 Mar 2004 04:39:38 +0000 (04:39 +0000)
committerChristopher Faylor <me@cgf.cx>
Tue, 16 Mar 2004 04:39:38 +0000 (04:39 +0000)
signal occurred during the parent's fork.  Otherwise leave it alone.

winsup/cygwin/ChangeLog
winsup/cygwin/cygtls.cc

index d47ddff6a6e1ef6a3c4e3ce3f0b9025e418cad73..51d09dde138d01082cca592b0e614f41def1956f 100644 (file)
@@ -1,3 +1,9 @@
+2004-03-15  Christopher Faylor  <cgf@redhat.com>
+
+       * cygtls.cc (_cygtls::fixup_after_fork): Just manipulate the signal
+       stack if a signal occurred during the parent's fork.  Otherwise leave
+       it alone.
+
 2004-03-15  Christopher Faylor  <cgf@redhat.com>
 
        * exceptions.cc (try_to_debug): Report on tid of caller.
index f6f4706349ac0cf3d7e9e8c8a47ffb2bc5be1935..d2db5eb2e6d2f948a3d8fe71cc4752c9f98c800a 100644 (file)
@@ -138,12 +138,13 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *))
 void
 _cygtls::fixup_after_fork ()
 {
-  sig = stacklock = 0;
+  if (sig)
+    {
+      pop ();
+      sig = 0;
+    }
+  stacklock = 0;
   wq.thread_ev = NULL;
-  stackptr = stack + 1;        // FIXME?
-#ifdef DEBUGGING
-  memset (stackptr, 0, sizeof (stack) - sizeof (stack[0]));
-#endif
 }
 
 void
This page took 0.034197 seconds and 5 git commands to generate.