From 8fcdf8a30020328396f10e2d79acc09eec25efdc Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 27 Aug 1999 21:01:06 +0000 Subject: [PATCH] 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. --- visudo.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) 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 */ } -- 2.40.0