]> granicus.if.org Git - sudo/commitdiff
Move call the save_signals() to before SIGINT, SIGQUIT and SIGTSTP
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 10 Feb 2013 23:24:56 +0000 (18:24 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 10 Feb 2013 23:24:56 +0000 (18:24 -0500)
are set to SIG_IGN.

--HG--
branch : 1.7

sudo.c

diff --git a/sudo.c b/sudo.c
index 6536007465e68296b1b51ca8c442dc62e3f46a3d..c41e2dc32f3d6184e0017bd21375adaf5f9f1020 100644 (file)
--- a/sudo.c
+++ b/sudo.c
@@ -211,6 +211,7 @@ main(argc, argv, envp)
      *  us at some point and avoid the logging.
      *  Install handler to wait for children when they exit.
      */
+    save_signals();
     zero_bytes(&sa, sizeof(sa));
     sigemptyset(&sa.sa_mask);
     sa.sa_flags = SA_RESTART;
@@ -1113,7 +1114,6 @@ initial_setup()
     /* Reset signal mask and save signal state. */
     (void) sigemptyset(&mask);
     (void) sigprocmask(SIG_SETMASK, &mask, NULL);
-    save_signals();
 
 #if defined(__linux__)
     /*