title: Dont terminate program in epoll_wait
body: <p>I want to handle if <code>epoll_wait</code> was interrupted by any reason (for example by SIGINT)</p>
  
  <pre><code>while ( true ) {
      n = epoll_wait ( epoll_fd, events, max_events, -1 );
      if ( errno == EINTR ) {
          ...
      }
  }
  </code></pre>
  
  <p>But debugger did not even go to <code>if</code>. Program was terminated in <code>epoll_wait</code>. I've added some magick:</p>
  
  <pre><code>signal ( SIGINT, placebo );
  while ( true ) {
      n = epoll_wait ( epoll_fd, events, max_events, -1 );
      if ( errno == EINTR ) {
          ...
      }
  }
  </code></pre>
  
  <p>And all works as expected. But this is ugly. What is the right way to let me handle any <code>epoll_wait</code>'s interrupt?</p>