forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasi: Fix a few issues around stdin (bytecodealliance#7063)
* wasi: Fix a few issues around stdin This commit is intended to address bytecodealliance#6986 and some other issues related to stdin and reading it, notably: * Previously once EOF was reached the `closed` flag was mistakenly not set. * Previously data would be infinitely buffered regardless of how fast the guest program would consume it. * Previously stdin would be immediately ready by Wasmtime regardless of whether the guest wanted to read stdin or not. * The host-side preview1-to-preview2 adapter didn't perform a blocking read meaning that it never blocked. These issues are addressed by refactoring the code in question. Note that this is similar to the logic of `AsyncReadStream` somewhat but that type is not appropriate in this context due to the singleton nature of stdin meaning that the per-stream helper task and per-stream buffer of `AsyncReadStream` are not appropriate. Closees bytecodealliance#6986 * Increase slop size for windows
- Loading branch information
1 parent
fe6563a
commit 4bced80
Showing
5 changed files
with
267 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.