title: epoll instantly returns on stdin
body: <p>I tried to do nonblocking IO with stdin and a some other fd.
  I added them to the rust library <code>mio</code>, but during debugging with strace I found out this is an epoll issue.</p>
  
  <p>When I add stdin to epoll, the epoll_wait returns instantly. It doesn't matter if I have the shell/term connected or pipe something else in (e.g. <code>cat</code>).</p>
  
  <p>The minimal C code to observe this:</p>
  
  <pre><code>#include &lt;sys/epoll.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;unistd.h&gt;
  int main(void)
  {
      char buffer[4096];
      int fd = epoll_create(5);
  
      struct epoll_event event;
  
      event.events = EPOLLIN;
      event.data.fd = 0;
  
      epoll_ctl(fd, EPOLL_CTL_ADD, 0, &amp;event);
  
      for (;;) {
          fprintf(stderr, "Going into epoll_wait\n");
          epoll_wait(fd, &amp;event, 1, 0);
          fprintf(stderr, "Going into read: %d\n", event.data.fd);
  
          printf("%ld\n", read(0, buffer, sizeof(buffer)));
      }
  }
  </code></pre>