Davide Libenzi
f348d70a32
[PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notifications
...
Implement the half-closed devices notifiation, by adding a new POLLRDHUP
(and its alias EPOLLRDHUP) bit to the existing poll/select sets. Since the
existing POLLHUP handling, that does not report correctly half-closed
devices, was feared to be changed, this implementation leaves the current
POLLHUP reporting unchanged and simply add a new bit that is set in the few
places where it makes sense. The same thing was discussed and conceptually
agreed quite some time ago:
http://lkml.org/lkml/2003/7/12/116
Since this new event bit is added to the existing Linux poll infrastruture,
even the existing poll/select system calls will be able to use it. As far
as the existing POLLHUP handling, the patch leaves it as is. The
pollrdhup-2.6.16.rc5-0.10.diff defines the POLLRDHUP for all the existing
archs and sets the bit in the six relevant files. The other attached diff
is the simple change required to sys/epoll.h to add the EPOLLRDHUP
definition.
There is "a stupid program" to test POLLRDHUP delivery here:
http://www.xmailserver.org/pollrdhup-test.c
It tests poll(2), but since the delivery is same epoll(2) will work equally.
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-25 08:22:56 -08:00
..
2006-03-22 15:04:23 +11:00
2005-09-09 22:11:34 +10:00
2005-09-21 19:21:08 +10:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2006-02-24 14:06:02 +11:00
2005-11-11 22:25:39 +11:00
2005-10-11 09:59:38 +10:00
2006-01-13 21:18:50 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 14:49:54 +11:00
2006-01-09 15:13:08 +11:00
2005-09-09 22:11:35 +10:00
2005-09-28 15:42:53 +10:00
2006-01-08 20:13:39 -08:00
2005-11-10 13:09:22 +11:00
2006-01-09 15:13:08 +11:00
2006-02-08 01:03:46 -05:00
2006-03-22 15:04:15 +11:00
2006-02-24 14:05:56 +11:00
2006-01-09 15:13:08 +11:00
2005-10-20 20:53:39 +10:00
2006-01-09 15:13:08 +11:00
2005-08-30 13:32:05 +10:00
2006-02-07 20:56:35 -05:00
2006-01-09 15:13:08 +11:00
2006-01-10 15:28:32 +11:00
2006-03-08 14:14:00 -08:00
2006-01-14 10:11:39 +11:00
2005-08-30 13:32:05 +10:00
2005-09-09 22:11:34 +10:00
2005-09-07 16:57:39 -07:00
2006-03-22 15:04:17 +11:00
2006-01-09 15:13:08 +11:00
2006-01-13 21:18:50 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:14:05 +11:00
2006-01-13 20:56:38 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2005-11-09 16:19:53 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2005-11-08 12:20:34 +11:00
2006-01-09 15:13:08 +11:00
2005-09-09 22:11:34 +10:00
2005-11-01 14:36:30 +11:00
2006-01-12 20:09:30 +11:00
2005-08-30 13:32:05 +10:00
2005-11-03 16:58:17 +11:00
2006-01-09 14:48:57 +11:00
2006-02-24 14:05:56 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 14:52:21 +11:00
2006-03-08 14:15:04 -08:00
2006-01-09 15:13:08 +11:00
2005-09-19 09:38:49 +10:00
2006-01-10 08:01:40 -08:00
2005-09-09 22:11:34 +10:00
2006-03-22 15:04:30 +11:00
2005-08-30 13:32:06 +10:00
2006-01-17 17:18:25 -08:00
2006-01-09 15:44:32 +11:00
2006-01-09 15:13:08 +11:00
2005-09-09 22:11:34 +10:00
2005-10-20 20:53:39 +10:00
2006-02-15 15:32:22 -08:00
2006-01-09 15:13:08 +11:00
2006-03-22 15:04:30 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2005-09-09 22:11:35 +10:00
2006-01-09 15:59:19 -08:00
2005-09-09 22:11:34 +10:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:14:05 +11:00
2006-01-09 15:13:08 +11:00
2006-02-24 14:05:56 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:13:08 +11:00
2006-01-11 16:27:21 +11:00
2006-01-09 15:13:08 +11:00
2006-01-11 14:49:24 +11:00
2006-01-12 20:09:30 +11:00
2006-01-09 14:51:08 +11:00
2006-03-23 07:38:17 -08:00
2006-02-17 13:59:27 -08:00
2006-03-09 14:32:05 +11:00
2006-01-09 15:13:08 +11:00
2006-03-22 22:20:46 -08:00
2006-01-09 15:47:18 +11:00
2006-01-09 15:47:18 +11:00
2006-02-01 08:53:10 -08:00
2006-01-09 15:13:08 +11:00
2006-03-25 08:22:56 -08:00
2005-09-21 19:21:07 +10:00
2006-02-24 14:05:56 +11:00
2006-03-16 16:55:07 +11:00
2006-03-22 15:04:17 +11:00
2006-03-17 13:21:09 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 14:49:01 +11:00
2005-11-10 13:09:22 +11:00
2006-02-24 11:36:31 +11:00
2005-08-30 13:32:06 +10:00
2006-01-11 14:48:26 +11:00
2005-10-22 15:57:55 +10:00
2006-02-10 16:53:51 +11:00
2005-10-27 16:45:52 +10:00
2006-01-09 15:14:05 +11:00
2006-01-09 15:13:08 +11:00
2005-10-31 13:37:12 +11:00
2005-09-09 22:11:34 +10:00
2006-01-10 16:19:05 +11:00
2005-09-09 22:11:35 +10:00
2005-09-09 22:11:35 +10:00
2005-09-09 22:11:34 +10:00
2005-11-03 16:24:25 +11:00
2005-09-12 17:19:12 +10:00
2006-01-09 15:13:08 +11:00
2005-11-07 13:18:13 +11:00
2006-02-07 22:05:14 -08:00
2005-09-09 22:11:34 +10:00
2005-09-09 22:11:34 +10:00
2006-01-09 15:13:08 +11:00
2005-09-21 19:21:09 +10:00
2006-01-13 21:18:50 +11:00
2006-01-09 15:13:08 +11:00
2006-01-09 15:44:57 +11:00
2005-10-28 22:48:08 +10:00
2005-11-03 16:02:23 +11:00
2005-09-21 19:21:10 +10:00
2005-09-09 22:11:34 +10:00
2006-02-24 14:06:00 +11:00
2006-03-22 15:04:25 +11:00
2006-01-09 15:13:08 +11:00
2005-09-09 22:11:34 +10:00
2005-11-01 14:36:55 +11:00
2006-03-08 13:24:22 +11:00
2006-02-24 14:05:56 +11:00
2005-10-12 08:24:47 -07:00
2006-01-09 15:13:08 +11:00
2005-11-06 16:56:47 -08:00
2006-01-12 09:08:50 -08:00
2005-10-27 16:45:50 +10:00
2005-11-10 13:10:38 +11:00
2005-11-03 16:59:17 +11:00
2006-01-11 14:48:26 +11:00
2005-09-09 22:11:34 +10:00
2005-10-20 20:53:39 +10:00
2006-02-10 16:34:54 +11:00
2005-09-09 22:11:35 +10:00
2006-01-09 15:13:08 +11:00
2005-11-16 14:05:11 +11:00
2005-09-21 19:21:09 +10:00
2006-01-09 15:13:08 +11:00
2005-11-08 22:55:08 +11:00
2005-08-30 13:32:05 +10:00