aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2008-02-19 21:42:48 +0000
committerChristopher Faylor <me@cgf.cx>2008-02-19 21:42:48 +0000
commit9feffba7d9efa09d0a0b3a7293f52418253d0d99 (patch)
tree4c1b533dda1b94ebe30a040e9e0fff4b7736e8bb
parent344f17f1fa35615d04034e52d545a8cb8d4aa7e9 (diff)
downloadnewlib-9feffba7d9efa09d0a0b3a7293f52418253d0d99.zip
newlib-9feffba7d9efa09d0a0b3a7293f52418253d0d99.tar.gz
newlib-9feffba7d9efa09d0a0b3a7293f52418253d0d99.tar.bz2
* 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 663f06d..c310ebb 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-16 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fpathconf): Fix _PC_NAME_MAX and
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index af9cd06..a6d8fed 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);