forked from risc0/risc0
-
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.
Change default PosixIo to use an empty vec for stdin (risc0#1148)
This PR changes the default `PosixIo` struct to hook the guest `stdin` to an empty vector, instead of the current default which is to use the host process `stdin`. This resolves issue risc0#1016, where it is easy to accidentally cause a difficult to debug hand on the process by forgetting to add an `ExectorEnvBuilder::write` call, resulting in the executor performing a blocking read on stdin. Note that if a developer does indeed want the host process `stdin` to be used as guest `stdin`, they can accomplish this by calling `builder.stdin(std::io::stdin())` while building the `ExectorEnv`. Related: risc0#1050 Resolves: risc0#1016
- Loading branch information
Showing
2 changed files
with
7 additions
and
3 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