From 2969ebebbf18e998a546b4d29953f92e877010f4 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Wed, 18 Jul 2018 16:55:18 +0000 Subject: Revert the change that delivers process signals to any threads. As side effect pending signals specifically sent to the main thread were handled by other threads. This made gcj in textproc/pdftk port build stall. Noticed and tested by espie@. --- sys/kern/kern_sig.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys/kern') diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 7a8a7a9ac69..72f58166b67 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_sig.c,v 1.222 2018/07/11 19:28:16 bluhm Exp $ */ +/* $OpenBSD: kern_sig.c,v 1.223 2018/07/18 16:55:17 bluhm Exp $ */ /* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */ /* @@ -1153,17 +1153,14 @@ issignal(struct proc *p) int s; for (;;) { - mask = SIGPENDING(p); + mask = p->p_siglist & ~p->p_sigmask; if (pr->ps_flags & PS_PPWAIT) mask &= ~stopsigmask; if (mask == 0) /* no signal to send */ return (0); signum = ffs((long)mask); mask = sigmask(signum); - if (p->p_siglist & mask) - atomic_clearbits_int(&p->p_siglist, mask); - else - atomic_clearbits_int(&pr->ps_mainproc->p_siglist, mask); + atomic_clearbits_int(&p->p_siglist, mask); /* * We should see pending but ignored signals @@ -1839,7 +1836,7 @@ userret(struct proc *p) KERNEL_UNLOCK(); } - if (SIGPENDING(p) != 0) { + if (SIGPENDING(p)) { KERNEL_LOCK(); while ((signum = CURSIG(p)) != 0) postsig(p, signum); -- cgit v1.2.3