epoll_ctl.2: After EPOLLHUP, EOF will be seen only after all data has been consumed

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-05-02 09:26:41 +02:00
parent 7e8924ba6a
commit ea735ea85e
1 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,10 @@ Hang up happened on the associated file descriptor.
.BR epoll_wait (2) .BR epoll_wait (2)
will always wait for this event; it is not necessary to set it in will always wait for this event; it is not necessary to set it in
.IR events . .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 .TP
.B EPOLLET .B EPOLLET
Sets the Edge Triggered behavior for the associated file descriptor. Sets the Edge Triggered behavior for the associated file descriptor.