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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-02-22 01:57:36 +0300
committerChristopher Faylor <me@cgf.cx>2004-02-22 01:57:36 +0300
commit4d5d7a2c0990cb8f2831a4dab6a3c760959e1e78 (patch)
tree1785fe7770f6713574a24b664c4b13ef7ddef33f
parent53a207edfa5b20949da5f6e89819950f54a80867 (diff)
* exceptions.cc (sigpacket::process): Make sure that tls is filled in for
SIGSTOP condition. (_cygtls::call_signal_handler): Restore signal mask using saved oldmask rather than current oldmask.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/exceptions.cc8
2 files changed, 12 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 5bf3ba677..3a2c01b60 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2004-02-21 Christopher Faylor <cgf@redhat.com>
+
+ * exceptions.cc (sigpacket::process): Make sure that tls is filled in
+ for SIGSTOP condition.
+ (_cygtls::call_signal_handler): Restore signal mask using saved oldmask
+ rather than current oldmask.
+
2004-02-20 Christopher Faylor <cgf@redhat.com>
* path.cc (conv_path_list): Return error condition.
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 7bc7c7775..f2aec7731 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -707,7 +707,7 @@ _cygtls::interrupt_setup (int sig, void *handler,
myself->process_state |= PID_STOPPED;
}
- this->sig = sig; // Should ALWAYS be last setting set to avoid a race
+ this->sig = sig; // Should always be last thing set to avoid a race
/* Clear any waiting threads prior to dispatching to handler function */
int res = SetEvent (signal_arrived); // For an EINTR case
@@ -955,6 +955,8 @@ sigpacket::process ()
if ( si.si_signo == SIGSTOP)
{
sig_clear (SIGCONT);
+ if (!tls)
+ tls = _main_tls;
goto stop;
}
@@ -1156,12 +1158,12 @@ _cygtls::call_signal_handler ()
(void) pop ();
reset_signal_arrived ();
- sigset_t oldmask = oldmask;
+ sigset_t this_oldmask = oldmask;
int this_errno = saved_errno;
set_process_mask (newmask);
sig = 0;
sigfunc (thissig);
- set_process_mask (oldmask);
+ set_process_mask (this_oldmask);
if (this_errno >= 0)
set_errno (this_errno);
}