]> granicus.if.org Git - sudo/commitdiff
Do not handle SIGARLM specially, just pass it through.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Feb 2011 15:36:23 +0000 (10:36 -0500)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 3 Feb 2011 15:36:23 +0000 (10:36 -0500)
--HG--
branch : 1.7

exec.c
exec_pty.c

diff --git a/exec.c b/exec.c
index ea1eba3fae1902bc7dcfac38a9135349bfe0b374..0c340f93cc0aaffb01550802b04e18fb66802605 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -282,11 +282,12 @@ sudo_execve(path, argv, envp, uid, cstat, dowait, bgmode)
     sigemptyset(&sa.sa_mask);
 
     /*
-     * Signals for forward to the child process (excluding SIGALRM and SIGCHLD).
+     * Signals for forward to the child process (excluding SIGCHLD).
      * Note: HP-UX select() will not be interrupted if SA_RESTART set.
      */
     sa.sa_flags = SA_INTERRUPT; /* do not restart syscalls */
     sa.sa_handler = handler;
+    sigaction(SIGALRM, &sa, NULL);
     sigaction(SIGCHLD, &sa, NULL);
     sigaction(SIGHUP, &sa, NULL);
     sigaction(SIGINT, &sa, NULL);
index 328fca8578d44491c383365c3d1866112bbe3bd8..68edc11a6f481e20321665bf02ae8419ba55da58 100644 (file)
@@ -587,9 +587,6 @@ deliver_signal(pid, signo)
 
     /* Handle signal from parent. */
     switch (signo) {
-    case SIGALRM:
-       terminate_child(pid, TRUE);
-       break;
     case SIGUSR1:
        /* Continue in foreground, grant it controlling tty. */
        do {
@@ -707,13 +704,12 @@ exec_monitor(path, argv, envp, backchannel, rbac)
     if (pipe_nonblock(signal_pipe) != 0)
        error(1, "cannot create pipe");
 
-    /* Reset SIGWINCH and SIGALRM. */
+    /* Reset SIGWINCH. */
     zero_bytes(&sa, sizeof(sa));
     sigemptyset(&sa.sa_mask);
     sa.sa_flags = SA_RESTART;
     sa.sa_handler = SIG_DFL;
     sigaction(SIGWINCH, &sa, NULL);
-    sigaction(SIGALRM, &sa, NULL);
 
     /* Ignore any SIGTTIN or SIGTTOU we get. */
     sa.sa_handler = SIG_IGN;