All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank van Maarseveen <frankvm@frankvm.com>
To: linux-kernel@vger.kernel.org
Subject: select() and poll() inconsistency in writability test
Date: Wed, 13 Sep 2006 15:29:34 +0200	[thread overview]
Message-ID: <20060913132934.GA637@janus> (raw)

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

                 reply	other threads:[~2006-09-13 13:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060913132934.GA637@janus \
    --to=frankvm@frankvm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.