diff --git a/library/std/src/sys/windows/process.rs b/library/std/src/sys/windows/process.rs index 51e16b9f13c..9ec775959fd 100644 --- a/library/std/src/sys/windows/process.rs +++ b/library/std/src/sys/windows/process.rs @@ -597,7 +597,7 @@ fn to_handle(&self, stdio_id: c::DWORD, pipe: &mut Option) -> io::Resu opts.read(stdio_id == c::STD_INPUT_HANDLE); opts.write(stdio_id != c::STD_INPUT_HANDLE); opts.security_attributes(&mut sa); - File::open(Path::new("NUL"), &opts).map(|file| file.into_inner()) + File::open(Path::new(r"\\.\NUL"), &opts).map(|file| file.into_inner()) } } }