read stderr before stdout

tests all write to stderr, so read stderr first to keep from blocking while reading stdout
This commit is contained in:
Ted Horst 2012-02-08 07:35:53 -06:00 committed by Brian Anderson
parent 36d5074f8f
commit 9fd2fcc99c

View file

@ -52,8 +52,8 @@ fn run(lib_path: str, prog: str, args: [str],
writeclose(pipe_in.out, input);
let output = readclose(pipe_out.in);
let errput = readclose(pipe_err.in);
let output = readclose(pipe_out.in);
let status = run::waitpid(pid);
ret {status: status, out: output, err: errput};
}