Catch SIGHUP, SIGQUIT and SIGTERM to allow running in the background.
When these signals are caught, a message will go to stderr.
SIGTERM also cause a stack trace to be sent to stderr.