about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-02-18 12:04:51 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-23 21:51:17 -0800
commita9bd447400c0854600e994f562e2b230171f328f (patch)
tree09a6faa8d9f40a5dbf491b215e749c8dca4df0be /src/libextra
parent8786405047cadcfb5ec3a2d711ca264d74843c13 (diff)
downloadrust-a9bd447400c0854600e994f562e2b230171f328f.tar.gz
rust-a9bd447400c0854600e994f562e2b230171f328f.zip
Roll std::run into std::io::process
The std::run module is a relic from a standard library long since past, and
there's not much use to having two modules to execute processes with where one
is slightly more convenient. This commit merges the two modules, moving lots of
functionality from std::run into std::io::process and then deleting
std::run.

New things you can find in std::io::process are:

* Process::new() now only takes prog/args
* Process::configure() takes a ProcessConfig
* Process::status() is the same as run::process_status
* Process::output() is the same as run::process_output
* I/O for spawned tasks is now defaulted to captured in pipes instead of ignored
* Process::kill() was added (plus an associated green/native implementation)
* Process::wait_with_output() is the same as the old finish_with_output()
* destroy() is now signal_exit()
* force_destroy() is now signal_kill()

Closes #2625
Closes #10016
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/workcache.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libextra/workcache.rs b/src/libextra/workcache.rs
index 007b54adbe5..133e5bc71f8 100644
--- a/src/libextra/workcache.rs
+++ b/src/libextra/workcache.rs
@@ -464,8 +464,8 @@ impl<'a, T:Send +
 #[test]
 #[cfg(not(target_os="android"))] // FIXME(#10455)
 fn test() {
-    use std::{os, run};
-    use std::io::fs;
+    use std::os;
+    use std::io::{fs, Process};
     use std::str::from_utf8_owned;
 
     // Create a path to a new file 'filename' in the directory in which
@@ -499,9 +499,9 @@ fn test() {
         prep.exec(proc(_exe) {
             let out = make_path(~"foo.o");
             // FIXME (#9639): This needs to handle non-utf8 paths
-            run::process_status("gcc", [pth.as_str().unwrap().to_owned(),
-                                        ~"-o",
-                                        out.as_str().unwrap().to_owned()]).unwrap();
+            Process::status("gcc", [pth.as_str().unwrap().to_owned(),
+                                    ~"-o",
+                                    out.as_str().unwrap().to_owned()]).unwrap();
 
             let _proof_of_concept = subcx.prep("subfn");
             // Could run sub-rules inside here.