]> granicus.if.org Git - sudo/commitdiff
Don't need to worry about catching too many signals since we do locking
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 27 Aug 1999 21:01:06 +0000 (21:01 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 27 Aug 1999 21:01:06 +0000 (21:01 +0000)
on the tmp file.  If a lockfile is really stale, it will be detected
and overwritten.

visudo.c

index 4cc16fbbd51d4eebfdf3172526a68f2e66871f78..5d0408a7160101e930bdd2fd5a676ce342853283 100644 (file)
--- 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 */
 }