1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-28 11:57:28 +00:00

I believe kbyanc@ really meant this in rev 1.58.

Use zpfind() to see if the process became a zombie if pfind() doesn't find it
and if the caller wants to know about process death, so that the caller knows
the process died even if it happened before the kevent was actually registered.

MFC after:	1 week
This commit is contained in:
Olivier Houchard 2003-11-04 01:41:47 +00:00
parent fce33fc5eb
commit 7922cdc855
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122019

View File

@ -195,12 +195,12 @@ filt_procattach(struct knote *kn)
immediate = 0;
p = pfind(kn->kn_id);
if (p == NULL)
return (ESRCH);
if (p == NULL && (kn->kn_sfflags & NOTE_EXIT)) {
p = zpfind(kn->kn_id);
immediate = 1;
}
if (p == NULL)
return (ESRCH);
if ((error = p_cansee(curthread, p))) {
PROC_UNLOCK(p);
return (error);