RE: Linux poll() <sigh> again

From: David Schwartz
Date: Fri May 12 2006 - 01:27:58 EST



> I have used the subsequent read() with a returned
> value of zero, to indicate that the client disconnected
> (as a work around). However, on recent versions of
> Linux, this is not reliable and the read() may
> wait forever instead of immediately returning.

If a 'read' on a non-blocking socket is waiting, something is seriously
wrong that goes way beyond 'poll'. If you're using a blocking socket, well,
blocking sockets block, 'poll' notwithstanding.

DS


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