Re: UDP recvmsg blocks after select(), 2.6 bug?

From: David S. Miller
Date: Wed Oct 06 2004 - 18:48:06 EST


On Wed, 6 Oct 2004 22:45:08 +0100
"Martijn Sipkema" <martijn@xxxxxxxxxx> wrote:

> The current behavious is definately not POSIX compliant; returning an error
> is better in any case

Not true at all. We in fact used to return -EAGAIN if the
checksum failed and the socket was blocking, and Olaf Kirch
pointed that out so we changed it to block instead and wait
for the next packet to arrive instead which is the correct
behavior.

People, get the heck over this. The kernel has behaved this way
for more than 3 years both in 2.4.x and 2.6.x. The code in question
even exists in the 2.2.x sources as well.

Therefore, it would be totally pointless to change the behavior
now since anyone writing an application wishing it to work on
all existing Linux kernels needs to handle this case anyways.

Like stated earlier, use non-blocking sockets with select()/poll()
and be happy.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/