summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2019-05-13 19:21:31 +0000
committerbluhm <bluhm@openbsd.org>2019-05-13 19:21:31 +0000
commit788422d65be41111bc05f25ec194535e3ae7eb6c (patch)
tree2a0e4cfda82fe14e76fd02a67a366b04f0eddc90 /sys/kern/kern_exit.c
parentDo not check for IFF_RUNNING inside bstp_initialization(). (diff)
downloadwireguard-openbsd-788422d65be41111bc05f25ec194535e3ae7eb6c.tar.xz
wireguard-openbsd-788422d65be41111bc05f25ec194535e3ae7eb6c.zip
When killing a process, the signal is handled by any thread that
does not block the signal. If all threads block the signal, we delivered it to the main thread. This does not conform to POSIX. If any thread unblocks the signal, it should be delivered immediately to this thread. Mark such signals pending at the process instead of a single thread. Then any thread can handle it later. OK kettenis@ guenther@
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 918ea4dc1bd..bff9a2c5ef7 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.173 2019/01/23 22:39:47 tedu Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.174 2019/05/13 19:21:31 bluhm Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -180,6 +180,8 @@ exit1(struct proc *p, int rv, int flags)
}
}
p->p_siglist = 0;
+ if ((p->p_flag & P_THREAD) == 0)
+ pr->ps_siglist = 0;
#if NKCOV > 0
kcov_exit(p);