pub fn on_process_exit(handler: impl FnOnce(&ProcessExitArgs) + Send + 'static)
Register a handler to run once when the current process exits.
handler
Note that the handler is only called if the process is terminated by exit, or by the executable main function returning if init! is called on it.
exit
init!