linux/net/dccp
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
..
ccids [DCCP] options: Make dccp_insert_options & friends yell on error 2006-03-20 22:32:06 -08:00
ackvec.c [DCCP] options: Make dccp_insert_options & friends yell on error 2006-03-20 22:32:06 -08:00
ackvec.h [DCCP] ackvec: Introduce ack vector records 2006-03-20 17:19:55 -08:00
ccid.c [DCCP] CCID: Improve CCID infrastructure 2006-03-20 19:21:44 -08:00
ccid.h [DCCP] options: Make dccp_insert_options & friends yell on error 2006-03-20 22:32:06 -08:00
dccp.h [DCCP] minisock: Rename struct dccp_options to struct dccp_minisock 2006-03-20 22:50:58 -08:00
diag.c [DCCP] minisock: Rename struct dccp_options to struct dccp_minisock 2006-03-20 22:50:58 -08:00
feat.c [DCCP] feat: Pass dccp_minisock ptr where only the minisock is used 2006-03-20 22:51:53 -08:00
feat.h [DCCP] feat: Pass dccp_minisock ptr where only the minisock is used 2006-03-20 22:51:53 -08:00
input.c [DCCP] minisock: Rename struct dccp_options to struct dccp_minisock 2006-03-20 22:50:58 -08:00
ipv4.c [NET]: Identation & other cleanups related to compat_[gs]etsockopt cset 2006-03-20 22:48:35 -08:00
ipv6.c [NET]: Identation & other cleanups related to compat_[gs]etsockopt cset 2006-03-20 22:48:35 -08:00
ipv6.h [DCCP]: Introduce DCCPv6 2006-01-03 13:10:52 -08:00
Kconfig [DCCP] ipv6: Add missing ipv6 control socket 2006-03-20 22:00:37 -08:00
Makefile [DCCP]: Move the IPv4 specific bits from proto.c to ipv4.c 2006-03-20 21:25:11 -08:00
minisocks.c [DCCP] minisock: Rename struct dccp_options to struct dccp_minisock 2006-03-20 22:50:58 -08:00
options.c [DCCP] minisock: Rename struct dccp_options to struct dccp_minisock 2006-03-20 22:50:58 -08:00
output.c [DCCP] options: Make dccp_insert_options & friends yell on error 2006-03-20 22:32:06 -08:00
proto.c [PATCH] POLLRDHUP/EPOLLRDHUP handling for half-closed devices notifications 2006-03-25 08:22:56 -08:00
sysctl.c [DCCP] feat: Introduce sysctls for the default features 2006-03-20 19:25:02 -08:00
timer.c [DCCP]: Generalize dccp_v4_send_reset 2006-03-20 19:25:24 -08:00