summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <vinschen@redhat.com>2008-02-21 11:43:31 +0000
committerCorinna Vinschen <vinschen@redhat.com>2008-02-21 11:43:31 +0000
commita124abbd9147ba464431de00a5e0d91e56da03f4 (patch)
treee008696c953d0cd87d5a3a659b842902d48767cf
parent388a43e8fe989d72eea97a9336a6a5dfbde263d4 (diff)
downloadgdb-a124abbd9147ba464431de00a5e0d91e56da03f4.tar.gz
* sigproc.cc (sig_send): Use sigmask of target thread if it is
specified otherwise default to main sigmask.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/sigproc.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index eab0418f65c..f730398db63 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-19 Christopher Faylor <me+cygwin@cgf.cx>
+
+ * sigproc.cc (sig_send): Use sigmask of target thread if it is
+ specified otherwise default to main sigmask.
+
2008-02-15 Christopher Faylor <me+cygwin@cgf.cx>
* exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 5eaac043c6b..863f9e1f864 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -663,7 +663,7 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
else if (si.si_signo == __SIGPENDING)
pack.mask = &pending;
else if (si.si_signo == __SIGFLUSH || si.si_signo > 0)
- pack.mask = &_my_tls.sigmask;
+ pack.mask = tls ? &tls->sigmask : &_main_tls->sigmask;
else
pack.mask = NULL;
@@ -673,7 +673,7 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
if (!pack.si.si_uid)
pack.si.si_uid = myself->uid;
pack.pid = myself->pid;
- pack.tls = (_cygtls *) tls;
+ pack.tls = tls;
if (wait_for_completion)
{
pack.wakeup = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);