Revise EVFILT_EXCEPT filters
authorvisa <visa@openbsd.org>
Mon, 13 Dec 2021 14:56:55 +0000 (14:56 +0000)
committervisa <visa@openbsd.org>
Mon, 13 Dec 2021 14:56:55 +0000 (14:56 +0000)
commit87c93f01794232be35da5db855061861fa67bb2f
tree1ef8e2d6c308ff769cdfcac3e0469bc3820460e0
parent468dccc2a2179e7c946ea1571af49e8c049c012d
Revise EVFILT_EXCEPT filters

Restrict the circumstances where EVFILT_EXCEPT filters trigger:
* when out-of-band data is present and NOTE_OOB is requested.
* when the channel is fully closed and consumer is poll(2).

This should clarify the logic and suppress events that kqueue-based
poll(2) does not except.

OK mpi@
sys/kern/sys_pipe.c
sys/kern/tty_pty.c
sys/kern/uipc_socket.c
sys/miscfs/fifofs/fifo_vnops.c