From 9feffba7d9efa09d0a0b3a7293f52418253d0d99 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 19 Feb 2008 21:42:48 +0000 Subject: [PATCH] * sigproc.cc (sig_send): Use sigmask of target thread if it is specified otherwise default to main sigmask. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/sigproc.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 663f06d9a..c310ebb36 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-02-19 Christopher Faylor + + * sigproc.cc (sig_send): Use sigmask of target thread if it is + specified otherwise default to main sigmask. + 2008-02-16 Corinna Vinschen * fhandler.cc (fhandler_base::fpathconf): Fix _PC_NAME_MAX and diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index af9cd0682..a6d8fed17 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);