summary refs log tree commit diff
path: root/src/test/run-fail/rt-set-exit-status-fail2.rs
blob: 4f8e357bfd8d29a2ffbcc504fbcdbf3e88b40021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// error-pattern:whatever

class r {
  let x:int;
            // Setting the exit status after the runtime has already
            // failed has no effect and the process exits with the
            // runtime's exit code
  drop {
    os::set_exit_status(50);
  }
  new(x:int) {self.x = x;}
}

fn main() {
    log(error, "whatever");
    do task::spawn {
      let i = r(5);
    };
    fail;
}