Some small cleanups to the fixes in r180340:
- Set NOTE_TRACKERR before running filt_proc(). If the knote did not have NOTE_FORK set in fflags when registered, then the TRACKERR event could miss being posted. - Don't pass the pid in to filt_proc() for NOTE_FORK events. The special handling for pids is done knote_fork() directly and no longer in filt_proc(). MFC after: 2 weeks
This commit is contained in:
parent
14b4517fa3
commit
7120845712
@ -477,7 +477,7 @@ knote_fork(struct knlist *list, int pid)
|
||||
*/
|
||||
if ((kn->kn_sfflags & NOTE_TRACK) == 0) {
|
||||
kn->kn_status |= KN_HASKQLOCK;
|
||||
if (kn->kn_fop->f_event(kn, NOTE_FORK | pid))
|
||||
if (kn->kn_fop->f_event(kn, NOTE_FORK))
|
||||
KNOTE_ACTIVATE(kn, 1);
|
||||
kn->kn_status &= ~KN_HASKQLOCK;
|
||||
KQ_UNLOCK(kq);
|
||||
@ -505,10 +505,10 @@ knote_fork(struct knlist *list, int pid)
|
||||
kev.data = kn->kn_id; /* parent */
|
||||
kev.udata = kn->kn_kevent.udata;/* preserve udata */
|
||||
error = kqueue_register(kq, &kev, NULL, 0);
|
||||
if (kn->kn_fop->f_event(kn, NOTE_FORK | pid))
|
||||
KNOTE_ACTIVATE(kn, 0);
|
||||
if (error)
|
||||
kn->kn_fflags |= NOTE_TRACKERR;
|
||||
if (kn->kn_fop->f_event(kn, NOTE_FORK))
|
||||
KNOTE_ACTIVATE(kn, 0);
|
||||
KQ_LOCK(kq);
|
||||
kn->kn_status &= ~KN_INFLUX;
|
||||
KQ_UNLOCK_FLUX(kq);
|
||||
|
Loading…
x
Reference in New Issue
Block a user