now cleanly handles SIGQUIT signal