]> granicus.if.org Git - sudo/commitdiff
When setting the signal handler for SIGTSTP to the default value
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 16 Sep 2012 22:40:39 +0000 (18:40 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 16 Sep 2012 22:40:39 +0000 (18:40 -0400)
in non-I/O log mode, store the old handler value for when we restore
it after resume.

src/exec.c

index 1c6427afb1ceaeeede100e89f590de21572b7f98..f88054c7f1f28ce1599b2892da87bd86e5933f8e 100644 (file)
@@ -576,7 +576,7 @@ handle_signals(int sv[2], pid_t child, int log_io, struct command_status *cstat)
                            zero_bytes(&sa, sizeof(sa));
                            sigemptyset(&sa.sa_mask);
                            sa.sa_handler = SIG_DFL;
-                           sigaction(SIGTSTP, &sa, NULL);
+                           sigaction(SIGTSTP, &sa, &osa);
                        }
                        if (kill(getpid(), signo) != 0)
                            warning("kill(%d, SIG%s)", (int)getpid(), signame);