From: kuznet@ms2.inr.ac.ru
To: Guy_Bolton_King@non.agilent.COM (Guy Bolton King)
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix poll bug
Date: Thu, 14 Dec 2000 22:17:15 +0300 (MSK) [thread overview]
Message-ID: <200012141917.WAA02918@ms2.inr.ac.ru> (raw)
In-Reply-To: <3A3896B0.9567E7DA@non.agilent.com> from "Guy Bolton King" at Dec 14, 0 01:15:01 pm
Hello!
> I believe I've found an inconsistency between the behaviour of poll(2)
> and select(2); select() is restartable in the face of signals
> (sys_select() returns ERESTARTNOHAND if a signal is pending), whilst
> poll() is not (sys_poll() returns EINTR).
poll() cannot be restarted.
select() can, because state of timer is remembered.
> breaking code (or at least breaking code that expects BSD signal
> behaviour as the default,
BSD behaviour is never to restart select() (because BSD does
not update timer, it is the only possible behaviour there, otherwise
select can never terminate). Its restart in some rare cases
(when signal happens to be ignored) is small optimization,
specific only to Linux.
> which I believe is also the POSIX
Seems, POSIX behaviour is not to restart any syscall.
Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
prev parent reply other threads:[~2000-12-14 19:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-14 9:45 Guy Bolton King
2000-12-14 19:17 ` kuznet [this message]
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=200012141917.WAA02918@ms2.inr.ac.ru \
--to=kuznet@ms2.inr.ac.ru \
--cc=Guy_Bolton_King@non.agilent.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®