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

From: Martijn Sipkema
Date: Thu Oct 07 2004 - 21:11:12 EST


From: "Chris Friesen" <cfriesen@xxxxxxxxxxxxxxxxxx>
> Hua Zhong wrote:
>
> > It was my original proposal. The only question is to return which error
> > code. We cannot return EAGAIN as Posix explicitly disallows it. Is EIO good?
> > Or some other new error code?
>
> Since we wouldn't be posix compliant anyway in the nonblocking case, we may as
> well return EAGAIN--it's the most appropriate.

No, I don't think so, since POSIX says to return EAGAIN when:

The socket's file descriptor is marked O_NONBLOCK and no data is waiting to
be received; or MSG_OOB is set and no out-of-band data is available and either
the socket's file descriptor is marked O_NONBLOCK or the socket does not
support blocking to await out-of-band data

So, I think returning EIO is probably better; I think that would be POSIX
compliant.


--ms

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