From 967631f2c84a8f2adae1772334fa77be40f18131 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 31 Mar 2017 07:01:57 +0200 Subject: [PATCH] epoll_ctl.2: Give the reader a clue that the 'events' field can be zero 'events' specified as zero still allows EPOLLHUP and EPOLLERR to be reported. Reported-by: Nicolas Biscos Signed-off-by: Michael Kerrisk --- man2/epoll_ctl.2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man2/epoll_ctl.2 b/man2/epoll_ctl.2 index 1ab91ba94..ded88ddc1 100644 --- a/man2/epoll_ctl.2 +++ b/man2/epoll_ctl.2 @@ -95,8 +95,8 @@ struct epoll_event { The .I events -member is a bit mask composed using the following available event -types: +member is a bit mask composed by ORing together zero or more of +the following available event types: .TP .B EPOLLIN The associated file is available for @@ -134,6 +134,7 @@ 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)