mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>,
	michael.kerrisk@gmx.net
Subject: Re: [patch] uniform POLLRDHUP handling between epoll and poll/select ...
Date: Mon, 3 Apr 2006 20:37:19 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604032034060.30048@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <12469.1144121501@www102.gmx.net>

On Tue, 4 Apr 2006, Michael Kerrisk wrote:

> 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?

Yes, ABI compatibility.



- Davide



      reply	other threads:[~2006-04-04  3:37 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
2006-04-04  3:37   ` Davide Libenzi [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=Pine.LNX.4.64.0604032034060.30048@alien.or.mcafeemobile.com \
    --to=davidel@xmailserver.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.kerrisk@gmx.net \
    --cc=mtk-manpages@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®