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

From: Hua Zhong
Date: Wed Oct 06 2004 - 15:41:26 EST


> From what Andries posted, we can't block. If select says
> its readable, we can "return data, an end-of-file indication,
> or an error other than one indicating that it is blocked".

Arrrrgh..I misread it as "or an error indicating that it is blocked"..

So treating it simply as NON_BLOCKING isn't right.

> Hmm...no easy solution then.
>
> In any case, the current behaviour is not compliant with the
> POSIX text that Andries posted. Perhaps this should be
> documented somewhere?
> Alternately, how about having the recvmsg() call return a
> zero, and (if appropriate) the length of the name set to zero? This
> appears to comply with the man page for recvmsg().

If it's a read, returning zero means end-of-file. Not sure what it means
when recvmsg returns zero..But is this just the problem of UDP or
recvmsg? I doubt it.

So I guess the easiest solution is just admit Linux select
isn't posix compliant.

> Chris

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