Package atexit provides handling for functions you want called when the program exits unexpectedly due to a signal.
You should also make sure you call Run in the normal exit path.
IgnoreSignals disables the signal handler and prevents Run from beeing executed automatically
Run all the at exit functions if they haven't been run already
Unregister a function using the handle returned by `Register`
type FnHandle *func()
FnHandle is the type of the handle returned by function `Register` that can be used to unregister an at-exit function
Register a function to be called on exit. Returns a handle which can be used to unregister the function with `Unregister`.