Xavier de Gaye added the comment:

For the reson why read() must still check for EWOULDBLOCK even though
after select() has reported a file descriptor ready for reading, see
the BUGS section of select linux man page, which says:

       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.

----------
nosy: +xdegaye

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16133>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to