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:
parent
8dba06aeee
commit
04c09f9466
5 changed files with 34 additions and 17 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue