Permalink
Browse files

Restore default signal handlers

This guarantees that the OS can handle further signals if, for example,
endwin() did not return.

Signed-off-by: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
  • Loading branch information...
1 parent 22bd244 commit a51cb56682ec0c89250154f6d352b8ee95742aac @tmatth tmatth committed with Mar 21, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 tig.c
View
3 tig.c
@@ -8234,6 +8234,9 @@ static const char usage[] =
static void TIG_NORETURN
quit(int sig)
{
+ if (sig)
+ signal(sig, SIG_DFL);
+
/* XXX: Restore tty modes and let the OS cleanup the rest! */
if (cursed)
endwin();

0 comments on commit a51cb56

Please sign in to comment.