Skip to content

Commit 7ed418c

Browse files
committed
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]: rust-lang/rfcs#941 [breaking-change]
1 parent 68740b4 commit 7ed418c

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

Diff for: src/librustc_back/target/apple_ios_base.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use std::old_io::{Command, IoError, OtherIoError};
11+
use std::io;
12+
use std::process::Command;
1213
use target::TargetOptions;
1314

1415
use self::Arch::*;
@@ -40,16 +41,15 @@ pub fn get_sdk_root(sdk_name: &str) -> String {
4041
.arg("--show-sdk-path")
4142
.arg("-sdk")
4243
.arg(sdk_name)
43-
.spawn()
44-
.and_then(|c| c.wait_with_output())
44+
.output()
4545
.and_then(|output| {
4646
if output.status.success() {
47-
Ok(String::from_utf8(output.output).unwrap())
47+
Ok(String::from_utf8(output.stdout).unwrap())
4848
} else {
49-
Err(IoError {
50-
kind: OtherIoError,
51-
desc: "process exit with error",
52-
detail: String::from_utf8(output.error).ok()})
49+
let error = String::from_utf8(output.stderr);
50+
Err(io::Error::new(io::ErrorKind::Other,
51+
"process exit with error",
52+
error.ok()))
5353
}
5454
});
5555

Diff for: src/libstd/old_io/process.rs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
//! Bindings for executing child processes
1212
1313
#![allow(non_upper_case_globals)]
14+
#![unstable(feature = "old_io")]
15+
#![deprecated(since = "1.0.0",
16+
reason = "replaced with the std::process module")]
1417

1518
pub use self::StdioContainer::*;
1619
pub use self::ProcessExit::*;

Diff for: src/libstd/sys/unix/process.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(deprecated)]
12+
1113
use prelude::v1::*;
1214
use self::Req::*;
1315

Diff for: src/libstd/sys/windows/process.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
#![allow(deprecated)]
12+
1113
use prelude::v1::*;
1214

1315
use collections;

0 commit comments

Comments
 (0)