Save exit status of an exiting process in kn_data in the knote.

Submitted by:	Jared Yanovich ^phirerunner at comcast.net^
MFC after:	2 weeks
This commit is contained in:
John Baldwin 2006-11-20 22:17:50 +00:00
parent 9df1370eab
commit 6600b45d88

View File

@ -396,6 +396,7 @@ filt_proc(struct knote *kn, long hint)
if (!(kn->kn_status & KN_DETACHED))
knlist_remove_inevent(&p->p_klist, kn);
kn->kn_flags |= (EV_EOF | EV_ONESHOT);
kn->kn_data = p->p_xstat;
kn->kn_ptr.p_proc = NULL;
return (1);
}