diff options
author | Christopher Faylor <me@cgf.cx> | 2004-03-16 04:39:38 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-03-16 04:39:38 +0000 |
commit | e867f8f1d48c59b55f42e222ede2bfa60d1c9786 (patch) | |
tree | 988720b7327651bd265e7de7667f9e772830ea06 /winsup/cygwin/cygtls.cc | |
parent | ff06cd9be9ce5929d3e119c6993c9621a5c4b251 (diff) | |
download | newlib-e867f8f1d48c59b55f42e222ede2bfa60d1c9786.zip newlib-e867f8f1d48c59b55f42e222ede2bfa60d1c9786.tar.gz newlib-e867f8f1d48c59b55f42e222ede2bfa60d1c9786.tar.bz2 |
* 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/cygtls.cc')
-rw-r--r-- | winsup/cygwin/cygtls.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index f6f4706..d2db5eb 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 |