summary refs log tree commit diff
path: root/src/test/run-fail/rt-set-exit-status-fail.rs
blob: fd32ff046003078ee679c063d2f8da456c477801 (plain)
1
2
3
4
5
6
7
8
9
10
// error-pattern:whatever

fn main() {
    log(error, "whatever");
    // Setting the exit status only works when the scheduler terminates
    // normally. In this case we're going to fail, so instead of of
    // returning 50 the process will return the typical rt failure code.
    sys::set_exit_status(50);
    fail;
}