OSDN Git Service

* cygtls.cc (_cygtls::fixup_after_fork): Just manipulate the signal stack if a
authorcgf <cgf>
Tue, 16 Mar 2004 04:39:37 +0000 (04:39 +0000)
committercgf <cgf>
Tue, 16 Mar 2004 04:39:37 +0000 (04:39 +0000)
signal occurred during the parent's fork.  Otherwise leave it alone.

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

index d47ddff..51d09dd 100644 (file)
@@ -1,5 +1,11 @@
 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.
 
        * sync.cc (muto::acquire): Fix some races.
index f6f4706..d2db5eb 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