diff --git a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs index 8d2ffa0efb..4837003ec9 100644 --- a/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs +++ b/crates/wasi-common/src/sys/windows/hostcalls_impl/misc.rs @@ -263,18 +263,9 @@ pub(crate) fn poll_oneoff( if fd_events.is_empty() { match timeout { Some((event, dur)) => return Ok(handle_timeout(event, dur, events)), - // `poll` invoked with nfds = 0, timeout = -1 appears to be an infinite sleep on Unix - // usually meant to be interrupted by a signal. Unfortunately, WASI doesn't currently - // support signals and there is no way to interrupt this infinite sleep, so we - // intend to return `ENOTSUP`. - // - // Unfortunately, current implementation of poll_oneoff on Unix relies on - // `poll_oneoff` returning `Ok(())` in such case, so we emulate this behavior for now - // and will address it in a subsequent PR. - None => { - // error!("poll_oneoff: invoking with neither timeout nor fds not supported"); - return Ok(()); // Err(Error::ENOTSUP); - } + // The implementation has to return Ok(()) in this case, + // cf. the comment in src/hostcalls_impl/misc.rs + None => return Ok(()), } }