Tue Apr 14 04:39:58 2015 UTC ()
Pull up following revision(s) (requested by christos in ticket #677):
	lib/libc/sys/kqueue.2: revision 1.34
	sys/kern/kern_event.c: revision 1.83
put the exit code of the process in data, like FreeBSD does.
--
say that we put the exit code in data.


(snj)
diff -r1.33 -r1.33.8.1 src/lib/libc/sys/kqueue.2
diff -r1.80 -r1.80.2.1 src/sys/kern/kern_event.c

cvs diff -r1.33 -r1.33.8.1 src/lib/libc/sys/kqueue.2 (expand / switch to context diff)
--- src/lib/libc/sys/kqueue.2 2012/11/24 15:16:52 1.33
+++ src/lib/libc/sys/kqueue.2 2015/04/14 04:39:58 1.33.8.1
@@ -1,4 +1,4 @@
-.\"	$NetBSD: kqueue.2,v 1.33 2012/11/24 15:16:52 christos Exp $
+.\"	$NetBSD: kqueue.2,v 1.33.8.1 2015/04/14 04:39:58 snj Exp $
 .\"
 .\" Copyright (c) 2000 Jonathan Lemon
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" $FreeBSD: src/lib/libc/sys/kqueue.2,v 1.22 2001/06/27 19:55:57 dd Exp $
 .\"
-.Dd November 24, 2012
+.Dd March 2, 2015
 .Dt KQUEUE 2
 .Os
 .Sh NAME
@@ -413,6 +413,8 @@
 .Bl -tag -width XXNOTE_TRACKERR
 .It NOTE_EXIT
 The process has exited.
+The exit code of the process is stored in
+.Va data .
 .It NOTE_FORK
 The process has called
 .Fn fork .

cvs diff -r1.80 -r1.80.2.1 src/sys/kern/kern_event.c (expand / switch to context diff)
--- src/sys/kern/kern_event.c 2014/06/24 14:42:43 1.80
+++ src/sys/kern/kern_event.c 2015/04/14 04:39:58 1.80.2.1
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_event.c,v 1.80 2014/06/24 14:42:43 maxv Exp $	*/
+/*	$NetBSD: kern_event.c,v 1.80.2.1 2015/04/14 04:39:58 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.80 2014/06/24 14:42:43 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.80.2.1 2015/04/14 04:39:58 snj Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -548,6 +548,10 @@
 		fflag |= event;
 
 	if (event == NOTE_EXIT) {
+		struct proc *p = kn->kn_obj;
+
+		if (p != NULL)
+			kn->kn_data = p->p_xstat;
 		/*
 		 * Process is gone, so flag the event as finished.
 		 *