<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="generator" content="Osso Notes">
    <title></title></head>
<body>
<p>----- Original message -----
<br>> In article <<a href="mailto:mailman.1105.1279945954.1673.python-list@python.org">mailman.1105.1279945954.1673.python-list@python.org</a>>,
<br>>   Kushal Kumaran <<a href="mailto:kushal.kumaran+python@gmail.com">kushal.kumaran+python@gmail.com</a>> wrote:
<br>>
<br>> > In general, after select has told you a descriptor is ready, the
<br>> > first write after that should always succeed.
<br>>
<br>> <snip>
<br>>
<br>> Consider, for example, a write on a TCP connection.   You are sitting in
<br>> a select(), when the other side closes the connection.   The select()
<br>> should return, and the write should then immediately fail.   If you're
<br>> tempted to say that the select() should return some sort of error,
<br>> consider the case where the remote end closes the connection after the
<br>> select() returns but before your process gets to execute the following
<br>> write() call.
<br>>
<br>> We also saw a case where (due to what we consider a kernel bug), a
<br>> received UDP packet with a checksum error would cause the select() to
<br>> wake up, *then* notice the checksum error and discard the packet, and
<br>> thus the following read() would block.
<br>>
<br>> <snip>
<br>
<br>Thanks Roy. That was educational.
<br>
<br>--
<br>regards,
<br>kushal<br></p>
</body>
</html>