Message188817
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. |
|
Date |
User |
Action |
Args |
2013-05-10 08:35:28 | xdegaye | set | recipients:
+ xdegaye, josiahcarlson, giampaolo.rodola, stutzbach, python-dev, Nidan |
2013-05-10 08:35:28 | xdegaye | set | messageid: <1368174928.38.0.027262086241.issue16133@psf.upfronthosting.co.za> |
2013-05-10 08:35:28 | xdegaye | link | issue16133 messages |
2013-05-10 08:35:27 | xdegaye | create | |
|