diff options
| author | Graydon Hoare <[email protected]> | 2011-04-19 13:35:49 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-19 13:35:49 -0700 |
| commit | d2bd07dcb02783063375b6c8532fceaf9fa9d50f (patch) | |
| tree | a253b5eadb140d14bc99d1456e316ce1e210a6be /src/lib/run_program.rs | |
| parent | rustc: Allow glue to be emitted even for scalar types; this is necessary to s... (diff) | |
| download | rust-d2bd07dcb02783063375b6c8532fceaf9fa9d50f.tar.xz rust-d2bd07dcb02783063375b6c8532fceaf9fa9d50f.zip | |
Remove effect system from src.
Diffstat (limited to 'src/lib/run_program.rs')
| -rw-r--r-- | src/lib/run_program.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/run_program.rs b/src/lib/run_program.rs index 105d01d5..31758984 100644 --- a/src/lib/run_program.rs +++ b/src/lib/run_program.rs @@ -14,7 +14,7 @@ fn argvec(str prog, vec[str] args) -> vec[sbuf] { ret argptrs; } -impure fn run_program(str prog, vec[str] args) -> int { +fn run_program(str prog, vec[str] args) -> int { auto pid = rustrt.rust_run_program(_vec.buf[sbuf](argvec(prog, args)), 0, 0, 0); ret os.waitpid(pid); @@ -25,11 +25,11 @@ type program = fn get_id() -> int; fn input() -> io.writer; fn output() -> io.reader; - impure fn close_input(); - impure fn finish() -> int; + fn close_input(); + fn finish() -> int; }; -impure fn start_program(str prog, vec[str] args) -> @program { +fn start_program(str prog, vec[str] args) -> @program { auto pipe_input = os.pipe(); auto pipe_output = os.pipe(); auto pid = rustrt.rust_run_program @@ -50,10 +50,10 @@ impure fn start_program(str prog, vec[str] args) -> @program { fn output() -> io.reader { ret io.new_reader(io.FILE_buf_reader(out_file, false)); } - impure fn close_input() { + fn close_input() { os.libc.close(in_fd); } - impure fn finish() -> int { + fn finish() -> int { if (finished) {ret 0;} finished = true; os.libc.close(in_fd); @@ -72,7 +72,7 @@ impure fn start_program(str prog, vec[str] args) -> @program { false); } -impure fn program_output(str prog, vec[str] args) +fn program_output(str prog, vec[str] args) -> rec(int status, str out) { auto pr = start_program(prog, args); pr.close_input(); |