That's still "forever" if you don't specify a timeout in the select.
>The actual final
>closure of the object occurs when the last operation on it exits
Select is defined as to return, with the appropriate bit set, if/when
a nonblocking read/write on the file descriptor won't block. You'd
get EBADF in this case, therefore causing the select to return would
be a Good Thing.
A related problem is that the second thread my be inside a blocking
read() instead of a select() call. It'd never continue. :-(
HOWEVER: IMHO it's bad design to distribute the responsibility for
file descriptors between threads.
Therefore I think that this behavior is a bug, but it's not one that
needs to be fixed yesterday.
-- Matthias Urlichs - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/