Disconnect signal handler when quit.