From 4fd22831fa6ef5221291bf28e569144409482cf9 Mon Sep 17 00:00:00 2001 From: Valentin D'Emmanuele Date: Sun, 7 Jun 2020 02:54:38 +0200 Subject: [PATCH] Fix stdin/stdout/stderr not being usable --- crates/wasi-common/src/ctx.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/wasi-common/src/ctx.rs b/crates/wasi-common/src/ctx.rs index 895c96ad6f17..8af7dd832e74 100644 --- a/crates/wasi-common/src/ctx.rs +++ b/crates/wasi-common/src/ctx.rs @@ -2,6 +2,7 @@ use crate::entry::{Entry, EntryHandle}; use crate::fdpool::FdPool; use crate::handle::Handle; use crate::sys::osdir::OsDir; +use crate::sys::osfile::OsFile; use crate::sys::osother::{OsOther, OsOtherExt}; use crate::sys::stdio::{Stderr, StderrExt, Stdin, StdinExt, Stdout, StdoutExt}; use crate::virtfs::{VirtualDir, VirtualDirEntry}; @@ -369,7 +370,7 @@ impl WasiCtxBuilder { .ok_or(WasiCtxBuilderError::TooManyFilesOpen)? } PendingEntry::OsHandle(f) => { - let handle = OsOther::try_from(f)?; + let handle = OsFile::try_from(f)?; let handle = EntryHandle::new(handle); let entry = Entry::new(handle); entries