Bug 23457

Summary: typeo in kern_sig.c
Product: Base System Reporter: yasu <yasu>
Component: kernAssignee: Marcel Moolenaar <marcel>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.1-STABLE   
Hardware: Any   
OS: Any   

Description yasu 2000-12-11 06:50:00 UTC
kern_sig.c was fully rewritten due to new sigset_t types around Sep. 1999. (between rev 1.64 to 1.65) There seems suspicous typo in trapsignal().

-	mask = sigmask(signum);
-	if ((p->p_flag & P_TRACED) == 0 && (p->p_sigcatch & mask) != 0 &&
-	    (p->p_sigmask & mask) == 0) {
+	if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(p->p_sigcatch, sig) &&
+	    SIGISMEMBER(p->p_sigmask, sig)) {
 		p->p_stats->p_ru.ru_nsignals++;
I guess the last condition in if statement should be !SIGMEMBER(p->p_sigmask, sig) instead of SIGMEMBER(p->p_sigmask, sig)

Fix: 

need a ! before the last SIGMEMBER()
Comment 1 Johan Karlsson freebsd_committer freebsd_triage 2000-12-16 16:09:31 UTC
Responsible Changed
From-To: freebsd-bugs->marcel

Marcel made the change back in 1999.
Comment 2 Peter Wemm freebsd_committer freebsd_triage 2000-12-28 07:26:27 UTC
State Changed
From-To: open->closed

Fixed in kern_sig.c rev 1.97 and 1.72.2.4