Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern put the exit code of the process in data, like Free...



details:   https://anonhg.NetBSD.org/src/rev/cd8bbb31367b
branches:  trunk
changeset: 336466:cd8bbb31367b
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 02 19:24:53 2015 +0000

description:
put the exit code of the process in data, like FreeBSD does.

diffstat:

 sys/kern/kern_event.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r e6068bcf7ec8 -r cd8bbb31367b sys/kern/kern_event.c
--- a/sys/kern/kern_event.c     Mon Mar 02 19:24:19 2015 +0000
+++ b/sys/kern/kern_event.c     Mon Mar 02 19:24:53 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_event.c,v 1.82 2014/09/05 09:20:59 matt Exp $     */
+/*     $NetBSD: kern_event.c,v 1.83 2015/03/02 19:24:53 christos 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.82 2014/09/05 09:20:59 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_event.c,v 1.83 2015/03/02 19:24:53 christos 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.
                 *



Home | Main Index | Thread Index | Old Index