about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-03-05 10:41:42 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-03-05 10:41:42 -0800
commit7ed418c3b4ede0364bf419b2c12b27f89b706dcf (patch)
treea7d0ab09a3c17fc6e987312293c3ffb2a0e2c469 /src
parent68740b405404a3f885e388c8d31722797d519c30 (diff)
downloadrust-7ed418c3b4ede0364bf419b2c12b27f89b706dcf.tar.gz
rust-7ed418c3b4ede0364bf419b2c12b27f89b706dcf.zip
std: Deprecate the old_io::process module
This module is now superseded by the `std::process` module. This module still
has some room to expand to get quite back up to parity with the `old_io`
version, and there is a [tracking issue][issue] for feature requests as well as
known room for expansion.

[issue]: https://github.com/rust-lang/rfcs/issues/941
[breaking-change]
Diffstat (limited to 'src')
-rw-r--r--src/librustc_back/target/apple_ios_base.rs16
-rw-r--r--src/libstd/old_io/process.rs3
-rw-r--r--src/libstd/sys/unix/process.rs2
-rw-r--r--src/libstd/sys/windows/process.rs2
4 files changed, 15 insertions, 8 deletions
diff --git a/src/librustc_back/target/apple_ios_base.rs b/src/librustc_back/target/apple_ios_base.rs
index 904b337c03f..2fbbe7d1f7c 100644
--- a/src/librustc_back/target/apple_ios_base.rs
+++ b/src/librustc_back/target/apple_ios_base.rs
@@ -8,7 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::old_io::{Command, IoError, OtherIoError};
+use std::io;
+use std::process::Command;
 use target::TargetOptions;
 
 use self::Arch::*;
@@ -40,16 +41,15 @@ pub fn get_sdk_root(sdk_name: &str) -> String {
                       .arg("--show-sdk-path")
                       .arg("-sdk")
                       .arg(sdk_name)
-                      .spawn()
-                      .and_then(|c| c.wait_with_output())
+                      .output()
                       .and_then(|output| {
                           if output.status.success() {
-                              Ok(String::from_utf8(output.output).unwrap())
+                              Ok(String::from_utf8(output.stdout).unwrap())
                           } else {
-                              Err(IoError {
-                                  kind: OtherIoError,
-                                  desc: "process exit with error",
-                                  detail: String::from_utf8(output.error).ok()})
+                              let error = String::from_utf8(output.stderr);
+                              Err(io::Error::new(io::ErrorKind::Other,
+                                                 "process exit with error",
+                                                 error.ok()))
                           }
                       });
 
diff --git a/src/libstd/old_io/process.rs b/src/libstd/old_io/process.rs
index a13295b1ccb..e02e863516a 100644
--- a/src/libstd/old_io/process.rs
+++ b/src/libstd/old_io/process.rs
@@ -11,6 +11,9 @@
 //! Bindings for executing child processes
 
 #![allow(non_upper_case_globals)]
+#![unstable(feature = "old_io")]
+#![deprecated(since = "1.0.0",
+              reason = "replaced with the std::process module")]
 
 pub use self::StdioContainer::*;
 pub use self::ProcessExit::*;
diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs
index 68c5c65e7cd..62a1799de94 100644
--- a/src/libstd/sys/unix/process.rs
+++ b/src/libstd/sys/unix/process.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(deprecated)]
+
 use prelude::v1::*;
 use self::Req::*;
 
diff --git a/src/libstd/sys/windows/process.rs b/src/libstd/sys/windows/process.rs
index 53a037ef07e..ca3ed54eb03 100644
--- a/src/libstd/sys/windows/process.rs
+++ b/src/libstd/sys/windows/process.rs
@@ -8,6 +8,8 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
+#![allow(deprecated)]
+
 use prelude::v1::*;
 
 use collections;