-/* $OpenBSD: kern_sig.c,v 1.283 2021/09/28 10:00:18 claudio Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.284 2021/10/04 08:48:12 claudio Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
syscallarg(siginfo_t *) info;
syscallarg(const struct timespec *) timeout;
} */ *uap = v;
- struct process *pr = p->p_p;
- sigset_t *m;
sigset_t mask = SCARG(uap, sigmask) &~ sigcantmask;
siginfo_t si;
uint64_t nsecs = INFSLP;
if (si.si_signo != 0) {
sigset_t smask = sigmask(si.si_signo);
if (smask & mask) {
- if (p->p_siglist & smask)
- m = &p->p_siglist;
- else if (pr->ps_siglist & smask)
- m = &pr->ps_siglist;
- else {
- /* signal got eaten by someone else? */
- continue;
- }
- atomic_clearbits_int(m, smask);
+ atomic_clearbits_int(&p->p_siglist, smask);
error = 0;
break;
}