diff options
| author | Tshepang Mbambo <hopsi@tuta.io> | 2025-08-18 08:31:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-18 08:31:49 +0200 |
| commit | 2787e9ebf933b2dfb3f3866913731560f9a359d8 (patch) | |
| tree | f79760d147848a6b9f97563a5a80dab46c7dd2d1 /library/std/src/sys/process | |
| parent | f2294bbccf7b2788e450a8f7cea13b3321709482 (diff) | |
| parent | 5818cbdd441bba57d509d549807af42f004ed21b (diff) | |
Merge pull request #2547 from rust-lang/rustc-pull
Rustc pull update
Diffstat (limited to 'library/std/src/sys/process')
| -rw-r--r-- | library/std/src/sys/process/windows.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/library/std/src/sys/process/windows.rs b/library/std/src/sys/process/windows.rs index 1ee3fbd285f..f9e15b82475 100644 --- a/library/std/src/sys/process/windows.rs +++ b/library/std/src/sys/process/windows.rs @@ -623,16 +623,10 @@ impl Stdio { // permissions as well as the ability to be inherited to child // processes (as this is about to be inherited). Stdio::Null => { - let size = size_of::<c::SECURITY_ATTRIBUTES>(); - let mut sa = c::SECURITY_ATTRIBUTES { - nLength: size as u32, - lpSecurityDescriptor: ptr::null_mut(), - bInheritHandle: 1, - }; let mut opts = OpenOptions::new(); opts.read(stdio_id == c::STD_INPUT_HANDLE); opts.write(stdio_id != c::STD_INPUT_HANDLE); - opts.security_attributes(&mut sa); + opts.inherit_handle(true); File::open(Path::new(r"\\.\NUL"), &opts).map(|file| file.into_inner()) } } |
