mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
f348d70a32
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> |
||
---|---|---|
.. | ||
a.out.h | ||
agp.h | ||
apb.h | ||
asi.h | ||
atomic.h | ||
auxio.h | ||
auxvec.h | ||
bbc.h | ||
bitops.h | ||
bpp.h | ||
bsderrno.h | ||
bug.h | ||
bugs.h | ||
byteorder.h | ||
cache.h | ||
cacheflush.h | ||
chafsr.h | ||
checksum.h | ||
chmctrl.h | ||
cmt.h | ||
compat.h | ||
const.h | ||
cpudata.h | ||
cputime.h | ||
current.h | ||
dcr.h | ||
dcu.h | ||
delay.h | ||
display7seg.h | ||
div64.h | ||
dma-mapping.h | ||
dma.h | ||
ebus.h | ||
elf.h | ||
emergency-restart.h | ||
envctrl.h | ||
errno.h | ||
estate.h | ||
fbio.h | ||
fcntl.h | ||
fhc.h | ||
floppy.h | ||
fpumacro.h | ||
futex.h | ||
hardirq.h | ||
head.h | ||
hw_irq.h | ||
hypervisor.h | ||
ide.h | ||
idprom.h | ||
intr_queue.h | ||
io.h | ||
ioctl.h | ||
ioctls.h | ||
iommu.h | ||
ipc.h | ||
ipcbuf.h | ||
irq.h | ||
isa.h | ||
kdebug.h | ||
kmap_types.h | ||
kprobes.h | ||
linkage.h | ||
local.h | ||
lsu.h | ||
mc146818rtc.h | ||
mman.h | ||
mmu.h | ||
mmu_context.h | ||
module.h | ||
mostek.h | ||
msgbuf.h | ||
mutex.h | ||
namei.h | ||
ns87303.h | ||
numnodes.h | ||
openprom.h | ||
openpromio.h | ||
oplib.h | ||
page.h | ||
param.h | ||
parport.h | ||
pbm.h | ||
pci.h | ||
pconf.h | ||
percpu.h | ||
perfctr.h | ||
pgalloc.h | ||
pgtable.h | ||
pil.h | ||
poll.h | ||
posix_types.h | ||
processor.h | ||
psrcompat.h | ||
pstate.h | ||
ptrace.h | ||
reg.h | ||
resource.h | ||
rtc.h | ||
rwsem-const.h | ||
rwsem.h | ||
sbus.h | ||
scatterlist.h | ||
scratchpad.h | ||
seccomp.h | ||
sections.h | ||
semaphore.h | ||
sembuf.h | ||
setup.h | ||
sfafsr.h | ||
sfp-machine.h | ||
shmbuf.h | ||
shmparam.h | ||
sigcontext.h | ||
siginfo.h | ||
signal.h | ||
smp.h | ||
socket.h | ||
sockios.h | ||
solerrno.h | ||
sparsemem.h | ||
spinlock.h | ||
spinlock_types.h | ||
spitfire.h | ||
starfire.h | ||
stat.h | ||
statfs.h | ||
string.h | ||
sunbpp.h | ||
svr4.h | ||
system.h | ||
termbits.h | ||
termios.h | ||
thread_info.h | ||
timer.h | ||
timex.h | ||
tlb.h | ||
tlbflush.h | ||
topology.h | ||
tsb.h | ||
ttable.h | ||
types.h | ||
uaccess.h | ||
uctx.h | ||
unaligned.h | ||
unistd.h | ||
upa.h | ||
user.h | ||
utrap.h | ||
vdev.h | ||
vga.h | ||
visasm.h | ||
watchdog.h | ||
xor.h |