Re: read returns EAGAIN on a _blocking_ socket, but should not? (solved)

From: Marc Lehmann
Date: Sun Dec 25 2005 - 11:17:51 EST


On Sun, Dec 25, 2005 at 04:16:11PM +0100, Marc Lehmann <schmorp@xxxxxxxxxx> wrote:
> Hi!
>
> The SuS documents EAGAIN for read(2) as:

Argl, false alarm, very very sorry :(

> sendmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"\0", 1}], msg_controllen=20, {cmsg_len=20, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {3}}, msg_flags=MSG_OOB|MSG_DONTROUTE}, 0) = 1

Due to a bug, this sendmsg call passes the wrong fd (3), which the other
process then sets to non-blocking.

Again, sorry :(

--
The choice of a
-----==- _GNU_
----==-- _ generation Marc Lehmann
---==---(_)__ __ ____ __ pcg@xxxxxxxx
--==---/ / _ \/ // /\ \/ / http://schmorp.de/
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
-
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/