You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use std::os::windows::process::CommandExt;letmut res = std::process::Command::new(args.path)// create a new console for child process.creation_flags(0x00000010).current_dir(dirp).spawn().unwrap();
It works well on win10, the new process has an individual console for stdout & stderr, keyboard for stdin.
But the same binary can't get the same result on win7, the new process throw a IO.Exception.
I tried to delete a line in std/src/sys/windows/process.rs line: 258 fn spawn()
// si.dwFlags = c::STARTF_USESTDHANDLES;
Which let the windows to set a default stdio for new process.
In this case, the binary works well on both win7 & win10.
Meta
Both stable and nightly version of the compiler has the same situation.