Skip to content

Commit 161b319

Browse files
authored
Disable support for nonblocking file I/O (#796)
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.
1 parent 6932875 commit 161b319

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • libc-bottom-half/sources

libc-bottom-half/sources/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int file_get_read_stream(void *data, wasi_read_t *read) {
123123
#endif
124124
read->offset = &file->offset;
125125
read->timeout = 0;
126-
read->blocking = (file->oflag & O_NONBLOCK) == 0;
126+
read->blocking = true;
127127
return 0;
128128
}
129129

@@ -193,7 +193,7 @@ static int file_get_write_stream(void *data, wasi_write_t *write) {
193193
#endif
194194
write->offset = &file->offset;
195195
write->timeout = 0;
196-
write->blocking = (file->oflag & O_NONBLOCK) == 0;
196+
write->blocking = true;
197197
return 0;
198198
}
199199

0 commit comments

Comments
 (0)