non-blocking IO EAGAIN on write
Kushal Kumaran
kushal.kumaran at gmail.com
Sun Jul 25 00:22:30 EDT 2010
----- Original message -----
> In article <mailman.1105.1279945954.1673.python-list at python.org>,
> Kushal Kumaran <kushal.kumaran+python at gmail.com> wrote:
>
> > In general, after select has told you a descriptor is ready, the
> > first write after that should always succeed.
>
> <snip>
>
> Consider, for example, a write on a TCP connection. You are sitting in
> a select(), when the other side closes the connection. The select()
> should return, and the write should then immediately fail. If you're
> tempted to say that the select() should return some sort of error,
> consider the case where the remote end closes the connection after the
> select() returns but before your process gets to execute the following
> write() call.
>
> We also saw a case where (due to what we consider a kernel bug), a
> received UDP packet with a checksum error would cause the select() to
> wake up, *then* notice the checksum error and discard the packet, and
> thus the following read() would block.
>
> <snip>
Thanks Roy. That was educational.
--
regards,
kushal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100725/ee3d7156/attachment-0001.html>
More information about the Python-list
mailing list