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

From: H. Peter Anvin
Date: Wed Oct 20 2004 - 16:38:03 EST


Followup to: <20041017133537.GL7468@xxxxxxxxxxxxxxxx>
By author: Lars Marowsky-Bree <lmb@xxxxxxx>
In newsgroup: linux.dev.kernel
>
> This actually forbids recvmsg() to return EAGAIN and EWOULDBLOCK as
> has been suggested. EIO seems to be the best fit.
>
> But I'd have to agree that blocking on recvmsg() after select() has
> indicated ready to read does violate the specification, unless the
> socket has actually been opened with O_NONBLOCK.
>

EIO seems to be The Right Thing[TM]... it pretty much says "yes, we
received something, but it was bad." What isn't clear to me is how
applications react to EIO. It could easily be considered a fatal
error... :-/

-hpa
-
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/