Document how to remove workaround for Cygwin select()

This commit is contained in:
Johannes Altmanninger
2026-04-28 14:49:01 +08:00
parent f2b0706494
commit 96695a2859

View File

@@ -430,7 +430,7 @@ fn run(self) {
// Note that WSLv1 doesn't throw EBADF if the fd is closed is mid-select.
drop(data);
let ret = fds.check_readable(timeout.map_or(Timeout::Forever, Timeout::Duration));
// Cygwin reports ret < 0 && errno == 0 as success.
// TODO Cygwin reports ret < 0 && errno == 0 as success. Remove the workaround for msys2-runtime>=3.6.9, see https://github.com/msys2/msys2-runtime/issues/308#issuecomment-4301066343
let err = errno().0;
if ret < 0 && !matches!(err, libc::EINTR | libc::EAGAIN) && !(cfg!(cygwin) && err == 0)
{