catch SIGHUP and SIGQUIT