From: "David Schwartz" <davids@webmaster.com>
To: "Mike Jagdis" <jaggy@purplet.demon.co.uk>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: PROBLEM: select() says closed socket readable
Date: Wed, 22 Aug 2001 14:40:51 -0700 [thread overview]
Message-ID: <NOEJJDACGOHCKNCOGFOMAECLDGAA.davids@webmaster.com> (raw)
In-Reply-To: <3B837AB3.40308@purplet.demon.co.uk>
> No. If there is a correct behaviour defined in a standard we should
> do that. Otherwise we should do what other systems do _unless_ there
> is a clear benefit to doing something else. In this case doing
> something else appears to create porting problems and confusion over
> what select(2) means without any clear benefit.
> Mike
There is a clear and significant benefit. Bugs that result in a program
calling 'select' on an unconnected socket will be easily and quickly
detected. During debugging, they can then be fixed. During release
execution, they can be worked around.
There are a large number of possible mistakes that can result in this
behavior. A program that heavily uses sockets could sometimes forget to
remove a socket from its active poll/select set. A program might
accidentally close the wrong socket (and that socket might get reused by a
subsequent call to 'socket'). It's nice to have a way to catch these. During
debug, socket errors are routinely logged or displayed, so this would get
caught.
Of course, this isn't so much of a benefit that it's worth violating a
standard like POSIX. But it could be considered enough of a benefit that
it's worth not being compatable outside the bounds of such a standard.
DS
next prev parent reply other threads:[~2001-08-22 21:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-18 3:28 PROBLEM: select() says closed socket readable Jay Rogers
2001-08-18 16:27 ` kuznet
2001-08-18 22:52 ` Ton Hospel
2001-08-20 14:34 ` Jay Rogers
2001-08-20 15:03 ` David S. Miller
2001-08-20 15:29 ` Udo A. Steinberg
2001-08-21 9:02 ` Mike Jagdis
2001-08-21 17:35 ` David Schwartz
2001-08-21 18:38 ` Alan Cox
2001-08-21 19:01 ` David Schwartz
2001-08-22 9:26 ` Mike Jagdis
2001-08-22 21:40 ` David Schwartz [this message]
2001-08-23 10:30 ` Mike Jagdis
2001-08-23 10:56 ` [PATCH] " Mike Jagdis
2001-08-20 19:48 ` PROBLEM: " David Schwartz
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=NOEJJDACGOHCKNCOGFOMAECLDGAA.davids@webmaster.com \
--to=davids@webmaster.com \
--cc=jaggy@purplet.demon.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox