We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 161b319 commit 213c3d2Copy full SHA for 213c3d2
1 file changed
libc-bottom-half/sources/file.c
@@ -123,7 +123,7 @@ static int file_get_read_stream(void *data, wasi_read_t *read) {
123
#endif
124
read->offset = &file->offset;
125
read->timeout = 0;
126
- read->blocking = true;
+ read->blocking = (file->oflag & O_NONBLOCK) == 0;
127
return 0;
128
}
129
@@ -193,7 +193,7 @@ static int file_get_write_stream(void *data, wasi_write_t *write) {
193
194
write->offset = &file->offset;
195
write->timeout = 0;
196
- write->blocking = true;
+ write->blocking = (file->oflag & O_NONBLOCK) == 0;
197
198
199
0 commit comments