Function zng_env::on_process_exit

source ยท
pub fn on_process_exit(handler: impl FnOnce(&ProcessExitArgs) + Send + 'static)
Expand description

Register a handler to run once when the current process exits.

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.