about summary refs log tree commit diff
path: root/src/libstd/sys/windows/ext
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-02-04 11:10:37 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-02-10 09:28:48 -0800
commitd15db1d392c9126ed5cc766753f08540c08a3626 (patch)
tree658ca3a080bba616aaeabe4194be4125d78c4737 /src/libstd/sys/windows/ext
parent18f9a79c23da8e8920e4c944656b9945f3544337 (diff)
downloadrust-d15db1d392c9126ed5cc766753f08540c08a3626.tar.gz
rust-d15db1d392c9126ed5cc766753f08540c08a3626.zip
std: Push process stdio setup in std::sys
Most of this is platform-specific anyway, and we generally have to jump through
fewer hoops to do the equivalent operation on Windows. One benefit for Windows
today is that this new structure avoids an extra `DuplicateHandle` when creating
pipes. For Unix, however, the behavior should be the same.

Note that this is just a pure refactoring, no functionality was added or
removed.
Diffstat (limited to 'src/libstd/sys/windows/ext')
-rw-r--r--src/libstd/sys/windows/ext/process.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/sys/windows/ext/process.rs b/src/libstd/sys/windows/ext/process.rs
index dffe68915fb..f6ee59eec32 100644
--- a/src/libstd/sys/windows/ext/process.rs
+++ b/src/libstd/sys/windows/ext/process.rs
@@ -21,7 +21,8 @@ use sys_common::{AsInner, FromInner, IntoInner};
 impl FromRawHandle for process::Stdio {
     unsafe fn from_raw_handle(handle: RawHandle) -> process::Stdio {
         let handle = sys::handle::Handle::new(handle as *mut _);
-        process::Stdio::from_inner(handle)
+        let io = sys::process::Stdio::Handle(handle);
+        process::Stdio::from_inner(io)
     }
 }