diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2016-02-04 09:53:01 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2016-02-10 09:28:48 -0800 |
| commit | b8bd8f3d7c9c8a3187d6c80ab201f66dedee457c (patch) | |
| tree | 2bda921922e188b907e6b4eaa710446ad80fefab /src/libstd/sys/windows/process.rs | |
| parent | 627515a7ff4fe12084d7e95969bda307849b4d0e (diff) | |
| download | rust-b8bd8f3d7c9c8a3187d6c80ab201f66dedee457c.tar.gz rust-b8bd8f3d7c9c8a3187d6c80ab201f66dedee457c.zip | |
std: Rename Stdio::None to Stdio::Null
This better reflects what it's actually doing as we don't actually have an option for "leave this I/O slot as an empty hole".
Diffstat (limited to 'src/libstd/sys/windows/process.rs')
| -rw-r--r-- | src/libstd/sys/windows/process.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs index e5e4187d228..8a522a0a795 100644 --- a/src/libstd/sys/windows/process.rs +++ b/src/libstd/sys/windows/process.rs @@ -122,7 +122,7 @@ pub struct Process { pub enum Stdio { Inherit, - None, + Null, Raw(c::HANDLE), } @@ -386,11 +386,10 @@ impl Stdio { RawHandle::new(handle).duplicate(0, true, c::DUPLICATE_SAME_ACCESS) } - // Similarly to unix, we don't actually leave holes for the - // stdio file descriptors, but rather open up /dev/null - // equivalents. These equivalents are drawn from libuv's - // windows process spawning. - Stdio::None => { + // Open up a reference to NUL with appropriate read/write + // permissions as well as the ability to be inherited to child + // processes (as this is about to be inherited). + Stdio::Null => { let size = mem::size_of::<c::SECURITY_ATTRIBUTES>(); let mut sa = c::SECURITY_ATTRIBUTES { nLength: size as c::DWORD, |
