File tree 2 files changed +5
-1
lines changed
src/tools/miri/src/shims/unix
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ pub struct EpollReadyEvents {
71
71
pub epollrdhup : bool ,
72
72
/// For stream socket, this event merely indicates that the peer
73
73
/// 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)`.
74
77
pub epollhup : bool ,
75
78
}
76
79
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ impl FileDescription for SocketPair {
69
69
epoll_ready_events. epollout = true ;
70
70
}
71
71
} 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.
73
74
epoll_ready_events. epollrdhup = true ;
74
75
epoll_ready_events. epollhup = true ;
75
76
// 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