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

H. Peter Anvin
2004-10-20T21:33:04Z

Followup to: <20041017133537.GL7468@marowsky-bree.de>
By author: Lars Marowsky-Bree <lmb@suse.de>
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