bug in select() in linux

From: Lluís Batlle
Date: Mon Mar 12 2007 - 10:51:40 EST


Hello,

I've found a problem in the select() call. The manpage states:
"those in writefds will be watched to see if a write will not block"

I've tried a select() for write against a closed tcp socket (closed by
the other side), and the select call _blocks_.

Any write() call to that socket will _not block_, and will return with EPIPE.

I've seen this happening in 2.4.20 and 2.6.16.29 (xen patched) at least.

Maybe it's a glibc problem - you may know better.

Could you please keep me in carbon copy? I'm not sure I want to
subscribe to LKML.

Regards,
Lluís.
-
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/