On Mon, Nov 20, 2006 at 07:22:13PM +0100, lua@zevv.nl wrote:
Nonblocking mode should never be necassery when using select(),
because of the proper behaviour of recv() as I described above.
Just a quick note that this is not necessarily true.
As I recall: for performance reasons Linux sockets are marked readable
when packets arrive, _before_ the packet checksums are tested. So a
corrupt packet can cause select() to report the socket as readable,
and a recv() call can then block when the delayed checksum test causes
the packet to be discarded. I think this has been observed causing
real problems with some UDP-based daemons.