From: "David Schwartz" <davids@webmaster.com>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: PROBLEM: select() says closed socket readable
Date: Tue, 21 Aug 2001 12:01:25 -0700 [thread overview]
Message-ID: <NOEJJDACGOHCKNCOGFOMIELCDFAA.davids@webmaster.com> (raw)
In-Reply-To: <E15ZGQN-0008QO-00@the-village.bc.nu>
> > No, because 'select' is defined to work the same on both
> > blocking and
> > non-blocking sockets. Roughly, select should hit on read if a
> > non-blocking
> > read wouldn't return 'would block'.
> Select is not reliable for a blocking socket in all cases. There
> is always
> a risk select may return "data to read" and the read will find
> there is now
> none. It isnt going to bite anyone on Linux with our current protocols but
> it may bite portable code
I should have continued my sentence with "if it was issued at the instant
'select' made that decision." Using 'select' on blocking sockets is usually
an error. Nevertheless, select itself is defined to work the same on both
blocking and non-blocking sockets. In general, there is no way the operating
system can make guarantees about the future state of a socket.
DS
next prev parent reply other threads:[~2001-08-21 19:01 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 [this message]
2001-08-22 9:26 ` Mike Jagdis
2001-08-22 21:40 ` David Schwartz
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=NOEJJDACGOHCKNCOGFOMIELCDFAA.davids@webmaster.com \
--to=davids@webmaster.com \
--cc=alan@lxorguk.ukuu.org.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