File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/tools/miri/src/shims/unix Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ pub struct EpollReadyEvents {
7171 pub epollrdhup : bool ,
7272 /// For stream socket, this event merely indicates that the peer
7373 /// closed its end of the channel.
74+ /// Unlike epollrdhup, this should only be set when the stream is fully closed.
75+ /// epollrdhup also gets set when only the write half is closed, which is possible
76+ /// via `shutdown(_, SHUT_WR)`.
7477 pub epollhup : bool ,
7578}
7679
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ impl FileDescription for SocketPair {
6969 epoll_ready_events. epollout = true ;
7070 }
7171 } else {
72- // Peer FD has been closed.
72+ // Peer FD has been closed. This always sets both the RDHUP and HUP flags
73+ // as we do not support `shutdown` that could be used to partially close the stream.
7374 epoll_ready_events. epollrdhup = true ;
7475 epoll_ready_events. epollhup = true ;
7576 // Since the peer is closed, even if no data is available reads will return EOF and
You can’t perform that action at this time.
0 commit comments