From ffb2e92a98fb1482e876fcd4571baaf1b7c53378 Mon Sep 17 00:00:00 2001 From: David Xu Date: Fri, 11 Jul 2003 13:42:23 +0000 Subject: If a thread is sending signal to its process, if the thread can handle the signal itself, it should get it without looking for other threads. --- sys/kern/kern_sig.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 099a7d0c64589..0e4c5b5823dec 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1553,10 +1553,11 @@ sigtd(struct proc *p, int sig, int prop) /* * If we know the signal is bound for a specific thread then we * assume that we are in that threads context. This is the case - * for SIGXCPU, SIGILL, etc. Otherwise someone did a kill() from - * userland and the real thread doesn't actually matter. + * for SIGXCPU, SIGILL, etc. Otherwise someone did a kill() from + * userland, if current thread can handle the signal, it should + * get the signal. */ - if ((prop & SA_PROC) != 0 && curthread->td_proc == p) + if (curthread->td_proc == p && !SIGISMEMBER(curthread->td_sigmask, sig)) return (curthread); /* -- cgit v1.3