From: Todd C. Miller Date: Fri, 27 Aug 1999 21:01:06 +0000 (+0000) Subject: Don't need to worry about catching too many signals since we do locking X-Git-Tag: SUDO_1_6_0~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8fcdf8a30020328396f10e2d79acc09eec25efdc;p=sudo Don't need to worry about catching too many signals since we do locking on the tmp file. If a lockfile is really stale, it will be detected and overwritten. --- diff --git a/visudo.c b/visudo.c index 4cc16fbbd..5d0408a71 100644 --- a/visudo.c +++ b/visudo.c @@ -444,33 +444,21 @@ setup_signals() #endif /* POSIX_SIGNALS */ /* - * Setup signal handlers + * Setup signal handlers to cleanup nicely. */ #ifdef POSIX_SIGNALS (void) memset((VOID *)&action, 0, sizeof(action)); action.sa_handler = Exit; action.sa_flags = SA_RESETHAND; - (void) sigaction(SIGILL, &action, NULL); - (void) sigaction(SIGTRAP, &action, NULL); - (void) sigaction(SIGBUS, &action, NULL); - (void) sigaction(SIGSEGV, &action, NULL); (void) sigaction(SIGTERM, &action, NULL); - - action.sa_handler = SIG_IGN; - action.sa_flags = 0; (void) sigaction(SIGHUP, &action, NULL); (void) sigaction(SIGINT, &action, NULL); (void) sigaction(SIGQUIT, &action, NULL); #else - (void) signal(SIGILL, Exit); - (void) signal(SIGTRAP, Exit); - (void) signal(SIGBUS, Exit); - (void) signal(SIGSEGV, Exit); (void) signal(SIGTERM, Exit); - - (void) signal(SIGHUP, SIG_IGN); - (void) signal(SIGINT, SIG_IGN); - (void) signal(SIGQUIT, SIG_IGN); + (void) signal(SIGHUP, Exit); + (void) signal(SIGINT, Exit); + (void) signal(SIGQUIT, Exit); #endif /* POSIX_SIGNALS */ }