From: Andries.Brouwer@cwi.nl
To: dean-list-linux-kernel@arctic.org, jcwren@jcwren.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: select() - Linux vs. BSD
Date: Fri, 1 Jun 2001 10:16:14 +0200 (MET DST) [thread overview]
Message-ID: <UTC200106010816.KAA162273.aeb@vlet.cwi.nl> (raw)
On Tue, 29 May 2001, John Chris Wren wrote:
> In BSD, select() states that when a time out occurs,
> the bits passed to select will not be altered.
> In Linux, which claims BSD compliancy for this
> in the man page (but does not state either way
> what will happen to the bits), zeros the users bit masks
> when a timeout occurs.
(i) "In BSD" - which one did you look at? 4.2? 4.3? 4.4?
Details differ a bit.
(ii) The Linux man page only says
RETURN VALUE
On success, select and pselect return the number of
descriptors contained in the descriptor sets, which may be
zero if the timeout expires before anything interesting
happens. On error, -1 is returned, and errno is set
appropriately; the sets and timeout become undefined, so
do not rely on their contents after an error.
That is, a wise programmer does not assume any particular value
for the bits after a timeout.
> Should the man pages be changed to reflect reality,
They do reflect reality.
> or select() fixed to act like BSD?
No, select() is fine.
dean gaudet answered:
sounds like a man page bug.
Shame on him for noticing man page bugs without cc'ing
the man page maintainer! Fortunately however, I do not
think anything is wrong here. But just to be sure I added
a sentence to select.2:
On BSD, when a timeout occurs, the file descriptor bits are not changed.
Linux follows SUSv2 and sets the bit masks to zero upon a timeout.
Andries
next reply other threads:[~2001-06-01 8:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-01 8:16 Andries.Brouwer [this message]
2001-06-01 16:38 ` lost
2001-06-02 21:46 ` Jamie Lokier
2001-06-03 2:13 ` lost
-- strict thread matches above, loose matches on Subject: below --
2001-06-03 2:47 John Chris Wren
2001-06-03 3:31 ` Mike Castle
2001-06-03 7:52 ` David Schwartz
2001-06-01 17:33 Andries.Brouwer
2001-05-29 15:55 John Chris Wren
2001-05-29 17:34 ` Mike Castle
2001-05-29 19:51 ` Alan Cox
2001-05-29 20:50 ` lost
2001-05-29 21:06 ` dean gaudet
2001-05-31 1:40 ` Dr. Kelsey Hudson
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=UTC200106010816.KAA162273.aeb@vlet.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=dean-list-linux-kernel@arctic.org \
--cc=jcwren@jcwren.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®