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