summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.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_exit.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_exit.c')
-rw-r--r--sys/kern/kern_exit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 89f4fa423fc..c9a2a9c93f0 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.107 2012/02/20 22:23:39 guenther Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.108 2012/03/10 05:54:28 guenther Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -140,6 +140,7 @@ exit1(struct proc *p, int rv, int flags)
}
if (flags == EXIT_NORMAL) {
+ atomic_setbits_int(&pr->ps_flags, PS_EXITING);
pr->ps_mainproc->p_xstat = rv;
/*