title: Spurious readiness notification for Select System call
body: <p>On <a href="http://linux.die.net/man/2/select" rel="noreferrer">http://linux.die.net/man/2/select</a>, under BUGS section it is mentioned that the select system call may sometimes spuriously set the FD ready and the subsequent read call will return 0. The text describes one such example (wrong checksum) but I am assuming there would be other reasons too (otherwise they would have fixed this). </p>
  
  <p>Any ideas what could the other causes for Select to return a FD ready spuriously. </p>
  
  <p>and does this apply to other OS'es also. I am currently asking about Linux.</p>
  
  <p>Relevant Section for the link above:</p>
  
  <blockquote>
    <p>Under Linux, select() may report a
    socket file descriptor as "ready for
    reading", while nevertheless a
    subsequent read blocks. This could for
    example happen when data has arrived
    but upon examination has wrong
    checksum and is discarded. There may
    be other circumstances in which a file
    descriptor is spuriously reported as
    ready. Thus it may be safer to use
    O_NONBLOCK on sockets that should not
    block.</p>
  </blockquote>