summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2010-05-18 22:26:09 +0000
committertedu <tedu@openbsd.org>2010-05-18 22:26:09 +0000
commitce0272ab83a2aa56bfa8d51be526ac59843bef3f (patch)
tree6b46eeefab75c8dd50397da26905ca55a4cd8b25 /sys/kern/kern_exit.c
parentadd posix_madvise, posix_memalign, strndup, and strnlen. mostly from (diff)
downloadwireguard-openbsd-ce0272ab83a2aa56bfa8d51be526ac59843bef3f.tar.xz
wireguard-openbsd-ce0272ab83a2aa56bfa8d51be526ac59843bef3f.zip
move knote list to struct process. ok guenther
Diffstat (limited to 'sys/kern/kern_exit.c')
-rw-r--r--sys/kern/kern_exit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 3ff122b1621..347bf0a0f8e 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.90 2010/03/24 23:18:17 tedu Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.91 2010/05/18 22:26:10 tedu Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -292,7 +292,8 @@ exit1(struct proc *p, int rv, int flags)
/*
* notify interested parties of our demise.
*/
- KNOTE(&p->p_klist, NOTE_EXIT);
+ if (p == p->p_p->ps_mainproc)
+ KNOTE(&p->p_p->ps_klist, NOTE_EXIT);
/*
* Notify parent that we're gone. If we have P_NOZOMBIE or parent has