Handle SIGHUP so that the registered exit handlers are called to restore the terminal back to its orignal state.