summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-03-16 04:39:38 +0000
committerChristopher Faylor <me@cgf.cx>2004-03-16 04:39:38 +0000
commite867f8f1d48c59b55f42e222ede2bfa60d1c9786 (patch)
tree988720b7327651bd265e7de7667f9e772830ea06 /winsup/cygwin
parentff06cd9be9ce5929d3e119c6993c9621a5c4b251 (diff)
downloadcygnal-e867f8f1d48c59b55f42e222ede2bfa60d1c9786.tar.gz
cygnal-e867f8f1d48c59b55f42e222ede2bfa60d1c9786.tar.bz2
cygnal-e867f8f1d48c59b55f42e222ede2bfa60d1c9786.zip
* cygtls.cc (_cygtls::fixup_after_fork): Just manipulate the signal stack if a
signal occurred during the parent's fork. Otherwise leave it alone.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/cygtls.cc11
2 files changed, 12 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d47ddff6a..51d09dde1 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index f6f470634..d2db5eb2e 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -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