# Functions
IgnoreSignals disables the signal handler and prevents Run from being executed automatically.
OnError registers fn with atexit and returns a function which runs fn() if *perr != nil and deregisters fn
It should be used in a defer statement normally so
defer OnError(&err, cancelFunc)()
So cancelFunc will be run if the function exits with an error or at exit.
Register a function to be called on exit.
Run all the at exit functions if they haven't been run already.
Signalled returns true if an exit signal has been received.
Unregister a function using the handle returned by `Register`.