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

--HG--
branch : 1.7

exec.c

diff --git a/exec.c b/exec.c
index d737fce1e03b7ea9ffa8a9e1fe13cbf6be683922..47c106ddd02f4838349feda2e4fd0ecd95323e3d 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -607,7 +607,7 @@ handle_signals(sv, child, 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, %d)", getpid(), signo);