diff options
author | mtm <mtm@FreeBSD.org> | 2003-07-05 08:37:40 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-07-05 08:37:40 +0000 |
commit | 50c58f02829cef64e9dd778b833c52023b126ff7 (patch) | |
tree | 7505c3b8409fde9ccefd84e87fdb2f1a6634e902 /sys | |
parent | aee9dc79b3371b57e7d2ce0840dc4133e66f1535 (diff) | |
download | FreeBSD-src-50c58f02829cef64e9dd778b833c52023b126ff7.zip FreeBSD-src-50c58f02829cef64e9dd778b833c52023b126ff7.tar.gz |
Make the conditional, which decides what siglist to put a signal on,
more concise and improve the comment.
Submitted by: bde
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_sig.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 8d22399..099a7d0 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1655,15 +1655,12 @@ do_tdsignal(struct thread *td, int sig, sigtarget_t target) prop = sigprop(sig); /* - * If this thread is blocking this signal then we'll leave it in the - * proc so that we can find it in the first thread that unblocks - * it-- unless the signal is meant for the thread and not the process. + * If the signal is blocked and not destined for this thread, then + * assign it to the process so that we can find it later in the first + * thread that unblocks it. Otherwise, assign it to this thread now. */ - if (target == SIGTARGET_P) - siglist = SIGISMEMBER(td->td_sigmask, sig) ? - &p->p_siglist : &td->td_siglist; - else - siglist = &td->td_siglist; + siglist = (target != SIGTARGET_TD && SIGISMEMBER(td->td_sigmask, sig)) ? + &p->p_siglist : &td->td_siglist; /* * If proc is traced, always give parent a chance; |