* select() and poll() inconsistency in writability test
@ 2006-09-13 13:29 Frank van Maarseveen
0 siblings, 0 replies; only message in thread
From: Frank van Maarseveen @ 2006-09-13 13:29 UTC (permalink / raw)
To: linux-kernel
A pipe without readers will yield EPIPE/SIGPIPE when trying to write()
into. A broken or shutdown TCP connection will behave the same modulo
networking errors (which are returned only once as it seems).
A pipe without readers will set POLLERR in pipe_poll() and this turns
up as being writable according to select() so it won't wait. However, a
TCP connection no longer open [for writing] does not set POLLERR/POLLOUT
in tcp_poll(): so it is not yet writable according to select() causing it
to wait. This is not consistent behavior.
Shouldn't the kernel set POLLOUT in both "EPIPE" cases instead of
POLLERR/nothing as it does now?
--
Frank
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-13 13:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-13 13:29 select() and poll() inconsistency in writability test Frank van Maarseveen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.