std: Run at_exit cleanup on process::exit

This adds a call to `rt::cleanup` on `process::exit` to make sure we clean up
after ourselves on the way out from Rust.

Closes #28065
This commit is contained in:
Alex Crichton 2015-08-28 10:50:16 -07:00
parent 8dba06aeee
commit 04c09f9466
5 changed files with 34 additions and 17 deletions

View file

@ -582,6 +582,7 @@ impl Child {
/// to run.
#[stable(feature = "rust1", since = "1.0.0")]
pub fn exit(code: i32) -> ! {
::rt::cleanup();
::sys::os::exit(code)
}