From e4f6fc939322cb2d021fe386421feec09193b6d7 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 22 Apr 2026 14:41:30 -0700 Subject: [PATCH] Disable support for nonblocking file I/O Concerns brought up in #788 rightfully point out that this doesn't work on other platforms and it's been such a core assumption for so long we run more of a risk of breaking code by supporting it than we do continuing to not support it. This means that some recent changes no longer have test coverage, but that seems best addressed by #766 so it's deferred to that. --- libc-bottom-half/sources/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc-bottom-half/sources/file.c b/libc-bottom-half/sources/file.c index 886a28de8..bc22e3bc4 100644 --- a/libc-bottom-half/sources/file.c +++ b/libc-bottom-half/sources/file.c @@ -123,7 +123,7 @@ static int file_get_read_stream(void *data, wasi_read_t *read) { #endif read->offset = &file->offset; read->timeout = 0; - read->blocking = (file->oflag & O_NONBLOCK) == 0; + read->blocking = true; return 0; } @@ -193,7 +193,7 @@ static int file_get_write_stream(void *data, wasi_write_t *write) { #endif write->offset = &file->offset; write->timeout = 0; - write->blocking = (file->oflag & O_NONBLOCK) == 0; + write->blocking = true; return 0; }