Closed
Description
The following program calls 'fail!()', but still results in an exit code of zero:
fn main () {
os::args();
fail!();
}
Here's what it looks like:
jclements-09740:~/clements/projects/rust-experimenting clements> rustc ./foo.rs && ./foo && echo "done"
Running /usr/local/bin/rustc:
warning: no debug symbols in executable (-arch x86_64)
rust: task failed at 'explicit failure', ./foo.rs:3
done
Commenting out the call to "os::args()" produces the expected output:
jclements-09740:~/clements/projects/rust-experimenting clements> rustc ./foo.rs && ./foo && echo "done"
Running /usr/local/bin/rustc:
warning: no debug symbols in executable (-arch x86_64)
rust: task failed at 'explicit failure', ./foo.rs:3
rust: domain main @0x7fdd91815e10 root task failed
... note the extra line of output, and the lack of the "done" message, indicating a nonzero exit code.