]> git.lizzy.rs Git - rust.git/commit
Don't abort the process in native::start
authorAlex Crichton <alex@alexcrichton.com>
Sat, 4 Jan 2014 20:21:46 +0000 (12:21 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Sun, 5 Jan 2014 17:20:31 +0000 (09:20 -0800)
commiteadfe0e3c9b55ec48637d5cdae36eca7421a8159
treee24dbf2474ff0fe6d1bce1708e127bc21747a925
parent4eceb0050c107c4ed18221bde9e5046613a710b6
Don't abort the process in native::start

If the main closure failed, then the `exit_code` variable would still be `None`,
and the `unwrap()` was failing (triggering a process abort). This changes the
`unwrap()` to an `unwrap_or()` in order to prevent process abort and detect when
the native task failed.
src/libnative/lib.rs
src/test/run-fail/native-failure.rs [new file with mode: 0644]