diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2013-05-31 19:01:57 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2013-05-31 19:01:57 +0000 |
commit | 167475d2342ef87069fb78ddf8841e0337e52eca (patch) | |
tree | c6e88c1e4a89ff3d1d7347418463c9b11be1561f /sys | |
parent | 6876a9b65463a3e60c39ec3b324f3bc358829162 (diff) |
On NOTE_EXIT event of EVFILT_PROC, store the exit status in kn_data.
ok guenther tedu deraadt
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_event.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 9a57e8e6672..3a7132d7445 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_event.c,v 1.49 2013/04/24 09:52:54 nicm Exp $ */ +/* $OpenBSD: kern_event.c,v 1.50 2013/05/31 19:01:56 yasuoka Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org> @@ -292,6 +292,7 @@ filt_proc(struct knote *kn, long hint) kn->kn_status |= KN_DETACHED; kn->kn_flags |= (EV_EOF | EV_ONESHOT); + kn->kn_data = pr->ps_mainproc->p_xstat; SLIST_REMOVE(&pr->ps_klist, kn, knote, kn_selnext); return (1); } |