Add a waitpid wrapper to std::run that interprets the exit status on unix
This makes the result of running a program a little more uniform between unix and windows
This commit is contained in:
parent
476bbca87a
commit
a1131748c2
2 changed files with 48 additions and 2 deletions
|
|
@ -65,3 +65,10 @@ fn test_pipes() {
|
|||
ret buf;
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn waitpid() {
|
||||
let pid = run::spawn_process("false", [], 0, 0, 0);
|
||||
let status = run::waitpid(pid);
|
||||
assert status == 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue