title: Does EPOLLONESHOT prevent multiple events on a single descriptor from being returned in a single call to epoll_wait()?
body: <p>The man page on <a href="http://man7.org/linux/man-pages/man2/epoll_ctl.2.html" rel="nofollow"><code>epoll_ctl(2)</code></a> has this to say about the <code>EPOLLONESHOT</code> flag:</p>
  
  <pre><code>Sets the one-shot behavior for the associated file descriptor.
  This means that after an event is pulled out with
  epoll_wait(2) the associated file descriptor is internally
  disabled and no other events will be reported by the epoll
  interface.  The user must call epoll_ctl() with EPOLL_CTL_MOD
  to rearm the file descriptor with a new event mask.
  </code></pre>
  
  <p>However, it isn't clear whether the event is disabled in an <code>epoll_wait</code> after being inserted into the event array or after all events have been returned.</p>