diff options
author | green <green@FreeBSD.org> | 2000-05-17 01:16:11 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2000-05-17 01:16:11 +0000 |
commit | b987a44176b0842184c50b2b8bef55a7e0e762a9 (patch) | |
tree | 3c72a035562df7584f2535daaa38b2e28b948dd8 /sys/kern/kern_event.c | |
parent | 28fde4831e337e9ba71dec7b314ca3b3e7c51fdf (diff) | |
download | FreeBSD-src-b987a44176b0842184c50b2b8bef55a7e0e762a9.zip FreeBSD-src-b987a44176b0842184c50b2b8bef55a7e0e762a9.tar.gz |
Put the wait(2) exit status in "data" for NOTE_EXIT kevents.
Diffstat (limited to 'sys/kern/kern_event.c')
-rw-r--r-- | sys/kern/kern_event.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index c22b248..46c8f26 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -264,6 +264,11 @@ filt_proc(struct knote *kn, long hint) if (event == NOTE_EXIT) { kn->kn_status |= KN_DETACHED; kn->kn_flags |= (EV_EOF | EV_ONESHOT); + /* + * Return the 16 bits of the wait(2) value. + */ + if (kn->kn_sfflags & NOTE_EXIT) + kn->kn_data = (intptr_t)hint & 0xffff; return (1); } |