From: "Michael Kerrisk" <mtk-manpages@gmx.net>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org, michael.kerrisk@gmx.net
Subject: Re: [patch] uniform POLLRDHUP handling between epoll and poll/select ...
Date: Tue, 4 Apr 2006 05:31:41 +0200 (MEST) [thread overview]
Message-ID: <12469.1144121501@www102.gmx.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0604032011040.30048@alien.or.mcafeemobile.com>
Davide,
> Like reported by Michael Kerrisk, POLLRDHUP handling was not consistent
> between epoll and poll/select, since in epoll it was unmaskeable. This
> patch brings uniformity in POLLRDHUP handling.
[...]
> diff -Nru linux-2.6.16/fs/eventpoll.c linux-2.6.16.mod/fs/eventpoll.c
> --- linux-2.6.16/fs/eventpoll.c 2006-04-03 20:08:23.000000000 -0700
> +++ linux-2.6.16.mod/fs/eventpoll.c 2006-04-03 20:09:51.000000000 -0700
> @@ -599,7 +599,7 @@
> switch (op) {
> case EPOLL_CTL_ADD:
> if (!epi) {
> - epds.events |= POLLERR | POLLHUP | POLLRDHUP;
> + epds.events |= POLLERR | POLLHUP;
>
> error = ep_insert(ep, &epds, tfile, fd);
> } else
> @@ -613,7 +613,7 @@
> break;
> case EPOLL_CTL_MOD:
> if (epi) {
> - epds.events |= POLLERR | POLLHUP | POLLRDHUP;
> + epds.events |= POLLERR | POLLHUP;
> error = ep_modify(ep, epi, &epds);
> } else
> error = -ENOENT;
This makes things consistent -- but in the opposite way
from what I thought they might be. (The alternative would of
course have been to make POLLRDHUP un-maskable in both epoll
and poll().)
So I'm curious: what is the rationale for making POLLRDHUP
maskable when POLLHUP is not? Is it an issue of ABI
compatibility; or something else?
Cheers,
Michael
--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7
Want to help with man page maintenance?
Grab the latest tarball at
ftp://ftp.win.tue.nl/pub/linux-local/manpages/,
read the HOWTOHELP file and grep the source
files for 'FIXME'.
next prev parent reply other threads:[~2006-04-04 3:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-04 3:15 Davide Libenzi
2006-04-04 3:31 ` Michael Kerrisk [this message]
2006-04-04 3:37 ` Davide Libenzi
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=12469.1144121501@www102.gmx.net \
--to=mtk-manpages@gmx.net \
--cc=akpm@osdl.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.kerrisk@gmx.net \
/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®