summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2012-03-10 05:54:28 +0000
committerguenther <guenther@openbsd.org>2012-03-10 05:54:28 +0000
commit762d41ba4f0054b363710b4dcefd08943e9c71b5 (patch)
tree5395486aa827027a4e8dff22d711443076beb3ac /sys/kern/kern_sig.c
parentldap doesnt necessarily do referential checks on the users in a (diff)
downloadwireguard-openbsd-762d41ba4f0054b363710b4dcefd08943e9c71b5.tar.xz
wireguard-openbsd-762d41ba4f0054b363710b4dcefd08943e9c71b5.zip
Add PS_EXITING to better differentiate between the process exiting and
the main thread exiting. c.f. regress/sys/kern/main-thread-exited/
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index e3ec6386bc0..9ab09b72920 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.134 2012/02/20 22:23:39 guenther Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.135 2012/03/10 05:54:28 guenther Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -756,7 +756,7 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
int s, prop;
sig_t action;
int mask;
- struct process *pr;
+ struct process *pr = p->p_p;
struct proc *q;
int wakeparent = 0;
@@ -766,12 +766,11 @@ ptsignal(struct proc *p, int signum, enum signal_type type)
#endif
/* Ignore signal if we are exiting */
- if (p->p_flag & P_WEXIT)
+ if (pr->ps_flags & PS_EXITING)
return;
mask = sigmask(signum);
- pr = p->p_p;
if (type == SPROCESS) {
/*
* A process-wide signal can be diverted to a different