oasis_core_runtime/common/process.rs
1//! Process-related helpers.
2use std::io::Write;
3
4/// Aborts the process via `std::process::abort`, but also making sure that log buffers are flushed.
5pub fn abort() -> ! {
6 // Attempt to flush buffers to ensure any log output makes it.
7 let _ = std::io::stderr().flush();
8 let _ = std::io::stdout().flush();
9
10 // Abort the process.
11 std::process::abort()
12}