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

Mistake in init using wrong fd in dup2, update userutils

parent 61ff6361
No related branches found
No related tags found
No related merge requests found
......@@ -15,8 +15,8 @@ fn switch_stdio(stdio: &str) -> Result<()> {
let stderr = OpenOptions::new().write(true).open(stdio)?;
syscall::dup2(stdin.as_raw_fd(), 0, &[]).map_err(|err| Error::from_raw_os_error(err.errno))?;
syscall::dup2(stdout.as_raw_fd(), 0, &[]).map_err(|err| Error::from_raw_os_error(err.errno))?;
syscall::dup2(stderr.as_raw_fd(), 0, &[]).map_err(|err| Error::from_raw_os_error(err.errno))?;
syscall::dup2(stdout.as_raw_fd(), 1, &[]).map_err(|err| Error::from_raw_os_error(err.errno))?;
syscall::dup2(stderr.as_raw_fd(), 2, &[]).map_err(|err| Error::from_raw_os_error(err.errno))?;
Ok(())
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment