diff options
author | Davide Libenzi <davidel@xmailserver.org> | 2006-04-11 01:54:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:42 -0400 |
commit | 2395140ee2bffe38b1c8a59318f62882b797f5e6 (patch) | |
tree | b8e8f6d6db2f1aa417bb32b8a5a376d0c0a478b2 /fs | |
parent | 0f6c840d774d669baf4727c0499ab0674826429f (diff) |
[PATCH] uniform POLLRDHUP handling between epoll and poll/select
As 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.
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/eventpoll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 242fe1a66ce5..1b4491cdd115 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -599,7 +599,7 @@ sys_epoll_ctl(int epfd, int op, int fd, struct epoll_event __user *event) | |||
599 | switch (op) { | 599 | switch (op) { |
600 | case EPOLL_CTL_ADD: | 600 | case EPOLL_CTL_ADD: |
601 | if (!epi) { | 601 | if (!epi) { |
602 | epds.events |= POLLERR | POLLHUP | POLLRDHUP; | 602 | epds.events |= POLLERR | POLLHUP; |
603 | 603 | ||
604 | error = ep_insert(ep, &epds, tfile, fd); | 604 | error = ep_insert(ep, &epds, tfile, fd); |
605 | } else | 605 | } else |
@@ -613,7 +613,7 @@ sys_epoll_ctl(int epfd, int op, int fd, struct epoll_event __user *event) | |||
613 | break; | 613 | break; |
614 | case EPOLL_CTL_MOD: | 614 | case EPOLL_CTL_MOD: |
615 | if (epi) { | 615 | if (epi) { |
616 | epds.events |= POLLERR | POLLHUP | POLLRDHUP; | 616 | epds.events |= POLLERR | POLLHUP; |
617 | error = ep_modify(ep, epi, &epds); | 617 | error = ep_modify(ep, epi, &epds); |
618 | } else | 618 | } else |
619 | error = -ENOENT; | 619 | error = -ENOENT; |