From ea735ea85ea1c26e39c1ac4e8430914cb22ac97a Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 2 May 2015 09:26:41 +0200 Subject: [PATCH] epoll_ctl.2: After EPOLLHUP, EOF will be seen only after all data has been consumed Signed-off-by: Michael Kerrisk --- man2/epoll_ctl.2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man2/epoll_ctl.2 b/man2/epoll_ctl.2 index 39d000653..1acf71402 100644 --- a/man2/epoll_ctl.2 +++ b/man2/epoll_ctl.2 @@ -130,6 +130,10 @@ Hang up happened on the associated file descriptor. .BR epoll_wait (2) will always wait for this event; it is not necessary to set it in .IR events . +Note that when reading from a channel such as a pipe or a stream socket, +this event merely indicates that the peer closed its end of the channel. +Subsequent reads from the channel will return 0 (end of file) +only after all outstanding data in the channel has been consumed. .TP .B EPOLLET Sets the Edge Triggered behavior for the associated file descriptor.