pal/process.rs
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4//! Process-related functionality.
5
6/// Terminates the process immediately with the given exit code.
7///
8/// This is similar to [`std::process::exit`], but it skips calling any cleanup
9/// functionality. This means stdout is not flushed, C++ destructors are not
10/// called, and Windows DLL DllMain functions are not called.
11pub fn terminate(exit_code: i32) -> ! {
12 crate::sys::process::terminate(exit_code)
13}