I'm modifying an app in order to replace its use of select() with kqueue. select() allows one to poll for exceptional conditions:
int select(int nfds,
fd_set *restrict readfds,
fd_set *restrict writefds,
fd_set *restrict errorfds, <---- this thing here
struct timeval *restrict timeout
);
After reading the kqueue documentation it looks like there's no way to do that. There's EVFILT_READ
and EVFILT_WRITE
but nothing along the lines of EVFILT_ERROR
/EVFILT_EXCEPTIONAL
. Is it possible to poll for exceptional conditions, and if so, how?