Module Name: src
Committed By: snj
Date: Tue Apr 14 04:39:58 UTC 2015
Modified Files:
src/lib/libc/sys [netbsd-7]: kqueue.2
src/sys/kern [netbsd-7]: kern_event.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.33.8.1 src/lib/libc/sys/kqueue.2
cvs rdiff -u -r1.80 -r1.80.2.1 src/sys/kern/kern_event.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/sys/kqueue.2
diff -u src/lib/libc/sys/kqueue.2:1.33 src/lib/libc/sys/kqueue.2:1.33.8.1
--- src/lib/libc/sys/kqueue.2:1.33 Sat Nov 24 15:16:52 2012
+++ src/lib/libc/sys/kqueue.2 Tue Apr 14 04:39:58 2015
@@ -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 @@ The events to monitor are:
.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 .
Index: src/sys/kern/kern_event.c
diff -u src/sys/kern/kern_event.c:1.80 src/sys/kern/kern_event.c:1.80.2.1
--- src/sys/kern/kern_event.c:1.80 Tue Jun 24 14:42:43 2014
+++ src/sys/kern/kern_event.c Tue Apr 14 04:39:58 2015
@@ -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 @@ filt_proc(struct knote *kn, long hint)
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.
*