diff options
| author | Eric Holk <eric.holk@gmail.com> | 2012-07-26 14:11:46 -0700 |
|---|---|---|
| committer | Eric Holk <eric.holk@gmail.com> | 2012-07-26 14:11:46 -0700 |
| commit | 96c6f57d18a26157117911a05152e135cfcee2ff (patch) | |
| tree | ff9e3958944c0e8b0d0b36cedf22174ee7346c2d | |
| parent | fec749df169945f856fcfe0c5ee265616a224d3a (diff) | |
Revert "Use pipes in compiletest"
This reverts commit 2d15b6ef424016765c659305a4265813d2b498d0. This seems like a likely candidate for causing the recent lock_and_signal failures. I'll revert it for now to see if it fixes it and hopefully nail down the problem better.
| -rw-r--r-- | src/compiletest/compiletest.rs | 5 | ||||
| -rw-r--r-- | src/compiletest/procsrv.rs | 27 |
2 files changed, 17 insertions, 15 deletions
diff --git a/src/compiletest/compiletest.rs b/src/compiletest/compiletest.rs index 1ee7edb4dc7..3ba358bfb93 100644 --- a/src/compiletest/compiletest.rs +++ b/src/compiletest/compiletest.rs @@ -8,6 +8,11 @@ import task; import core::result; import result::{ok, err}; +import comm::port; +import comm::chan; +import comm::send; +import comm::recv; + import common::config; import common::mode_run_pass; import common::mode_run_fail; diff --git a/src/compiletest/procsrv.rs b/src/compiletest/procsrv.rs index d93ae3f8017..35da5d2bc6d 100644 --- a/src/compiletest/procsrv.rs +++ b/src/compiletest/procsrv.rs @@ -2,8 +2,6 @@ import run::spawn_process; import io::{writer_util, reader_util}; import libc::{c_int, pid_t}; -import pipes::chan; - export run; #[cfg(target_os = "win32")] @@ -60,30 +58,29 @@ fn run(lib_path: ~str, writeclose(pipe_in.out, input); - let p = pipes::port_set(); - let ch = p.chan(); + let p = comm::port(); + let ch = comm::chan(p); do task::spawn_sched(task::single_threaded) { let errput = readclose(pipe_err.in); - ch.send((2, errput)); + comm::send(ch, (2, errput)); } - let ch = p.chan(); do task::spawn_sched(task::single_threaded) { let output = readclose(pipe_out.in); - ch.send((1, output)); + comm::send(ch, (1, output)); } let status = run::waitpid(pid); let mut errs = ~""; let mut outs = ~""; let mut count = 2; while count > 0 { - alt p.recv() { - (1, s) { - outs = s; - } - (2, s) { - errs = s; - } - _ { fail } + let stream = comm::recv(p); + alt check stream { + (1, s) { + outs = s; + } + (2, s) { + errs = s; + } }; count -= 1; }; |
