title: Select not working properly
body: <p>In my application, when alarm fires, i write an integer to a pipe from the signal handler. 
  In my main application, i forever loop on select() with 0 timeout value. 
  The problem is that signal handler successfully writes to the write end of the pipe, but select NEVER shows that readability of the read end of the pipe. So in the below pseudo code , return value from select would be 0.
  Even what is more preplexing is that if i remove select and simply do a blocking read(), it works!!! i can read the integer written by the handler. It is just that select always think that the read end of the pipe is not readable and hence always return 0. </p>
  
  <p>So pseduo code looks like</p>
  
  <pre><code>int x=0;
  for(;;)
  {
  
     x = select(maxfd, &amp;readfd, NULL, NULL, &amp;dontWait); // dontWait is timeval with tv_sec and tv_usec = 0
      if (x == 1)
       //check for read descriptor and do something
  }
  </code></pre>