From: Todd C. Miller Date: Sun, 10 Feb 2013 23:24:56 +0000 (-0500) Subject: Move call the save_signals() to before SIGINT, SIGQUIT and SIGTSTP X-Git-Tag: SUDO_1_7_10p6~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b3b73f814da0f1c8698c5494361f4ca4385d3b4;p=sudo Move call the save_signals() to before SIGINT, SIGQUIT and SIGTSTP are set to SIG_IGN. --HG-- branch : 1.7 --- diff --git a/sudo.c b/sudo.c index 653600746..c41e2dc32 100644 --- 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__) /*