diff options
| author | Hugo Beauzée-Luyssen <hugo@beauzee.fr> | 2019-05-27 16:51:29 +0200 |
|---|---|---|
| committer | Hugo Beauzée-Luyssen <hugo@beauzee.fr> | 2019-07-25 21:30:08 +0200 |
| commit | a713a0399a6e63de1c8009a390ae964ff03f4067 (patch) | |
| tree | 9154a6d4ac29ade41d40fca9933f67332431ed7d /src/libstd/sys/windows/process.rs | |
| parent | 9407ed759fd31fca3c32c1bc3b3e2f26313c462f (diff) | |
| download | rust-a713a0399a6e63de1c8009a390ae964ff03f4067.tar.gz rust-a713a0399a6e63de1c8009a390ae964ff03f4067.zip | |
std: win: Don't use SetHandleInformation on UWP
Attempt to create sockets with the WSA_FLAG_NO_HANDLE_INHERIT flag, and handle the potential error gracefully (as the flag isn't support on Windows 7 before SP1)
Diffstat (limited to 'src/libstd/sys/windows/process.rs')
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index e39b7ae8890..05e0ca67064 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -267,13 +267,8 @@ impl Stdio { Stdio::MakePipe => { let ours_readable = stdio_id != c::STD_INPUT_HANDLE; - let pipes = pipe::anon_pipe(ours_readable)?; + let pipes = pipe::anon_pipe(ours_readable, true)?; *pipe = Some(pipes.ours); - cvt(unsafe { - c::SetHandleInformation(pipes.theirs.handle().raw(), - c::HANDLE_FLAG_INHERIT, - c::HANDLE_FLAG_INHERIT) - })?; Ok(pipes.theirs.into_handle()) } |
