Skip to content
Snippets Groups Projects
Commit a5d579bb authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Flush for Redox stdin_of

parent d8895737
Branches
Tags
No related merge requests found
...@@ -105,6 +105,7 @@ pub mod crossplat { ...@@ -105,6 +105,7 @@ pub mod crossplat {
// Write the contents; make sure to use write_all so that we block until // Write the contents; make sure to use write_all so that we block until
// the entire string is written // the entire string is written
infile.write_all(input.as_ref())?; infile.write_all(input.as_ref())?;
infile.flush()?;
// `infile` currently owns the writer end RawFd. If we just return the reader end // `infile` currently owns the writer end RawFd. If we just return the reader end
// and let `infile` go out of scope, it will be closed, sending EOF to the reader! // and let `infile` go out of scope, it will be closed, sending EOF to the reader!
Ok(Stdio::from_raw_fd(reader)) Ok(Stdio::from_raw_fd(reader))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment