lkml.org 
[lkml]   [2006]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] uniform POLLRDHUP handling between epoll and poll/select ...
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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-04 05:40    [W:0.035 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site