Make filt_dead() selectively inactive with EVFILT_EXCEPT
authorvisa <visa@openbsd.org>
Mon, 20 Dec 2021 16:24:32 +0000 (16:24 +0000)
committervisa <visa@openbsd.org>
Mon, 20 Dec 2021 16:24:32 +0000 (16:24 +0000)
commit321d7ba141e19399acc4e55887d372f671ba8624
tree91301be5095b843dc7e375cb7d66fb8311f3ada2
parent3a22be5ae011a2484674d29bfc23eaf175685b96
Make filt_dead() selectively inactive with EVFILT_EXCEPT

When a knote uses the dead event filter, the knote's file descriptor is
not supposed to point to an object with pending out-of-band data. Make
the knote inactive so that userspace will not receive a spurious event.
However, kqueue-based poll(2) should still receive HUP notifications.

This lets the system use dead_filtops with less strings attached
relative to the filter type.
sys/kern/kern_event.c