summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exit.c
diff options
context:
space:
mode:
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 9115f97..0b16060 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -307,9 +307,10 @@ exit1(p, rv)
switchticks = ticks;
/*
- * notify interested parties of our demise.
+ * Notify interested parties of our demise. Pass the lower (only)
+ * 16 bits of our exit code along with it.
*/
- KNOTE(&p->p_klist, NOTE_EXIT);
+ KNOTE(&p->p_klist, NOTE_EXIT | (rv & 0xffff));
/*
* Notify parent that we're gone. If parent has the PS_NOCLDWAIT
OpenPOWER on IntegriCloud