Re: Multithreaded select() bug

From: Manfred Spraul
Date: Tue May 11 2004 - 14:45:01 EST


Hi Andre,

> As I understand it, if 1 is true (which corresponds to my original
> post), then select should return the moment the socket gets closed

One problem: You do not close the socket. The select() call itself keeps
the socket open ;-)

It was discussed a few months ago with poll(): The standard is wrong,
noone implements it as specified. Just think what should happen if the
selected fd is replaced with dup2(). HP UX kills the process if you do
that with poll - I expect that select causes the same result.

You'll have to change your user space app.

--
Manfred

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