diff options
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r-- | winsup/cygwin/thread.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index ae03dc626..b04dfa116 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -2736,7 +2736,12 @@ pthread_kill (pthread_t thread, int sig) if (!pthread::is_good_object (&thread)) return EINVAL; - int rval = sig ? sig_send (NULL, sig, thread->cygtls) : 0; + siginfo_t si; + si.si_signo = sig; + si.si_code = SI_USER; + si.si_pid = si.si_uid = si.si_errno = 0; + thread->cygtls->set_threadkill (); + int rval = sig ? sig_send (NULL, si, thread->cygtls) : 0; // unlock myself return rval; |