----- Original message ----- > In article <mailman.1105.1279945954.1673.python-l...@python.org>, > Kushal Kumaran <kushal.kumaran+pyt...@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
-- http://mail.python.org/mailman/listinfo/python-list