We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e5cb103 commit efca399Copy full SHA for efca399
1 file changed
crates/wasi-common/src/sys/unix/stdio.rs
@@ -26,14 +26,14 @@ impl StdioExt for Stdio {
26
Ok(Box::new(Self::In { rights }))
27
}
28
fn stdout() -> io::Result<Box<dyn Handle>> {
29
- let file = unsafe { File::from_raw_fd(io::stdin().as_raw_fd()) };
+ let file = unsafe { File::from_raw_fd(io::stdout().as_raw_fd()) };
30
let file = ManuallyDrop::new(file);
31
let rights = get_rights(&file)?;
32
let rights = Cell::new(rights);
33
Ok(Box::new(Self::Out { rights }))
34
35
fn stderr() -> io::Result<Box<dyn Handle>> {
36
+ let file = unsafe { File::from_raw_fd(io::stderr().as_raw_fd()) };
37
38
39
0 commit comments