From: Todd C. Miller Date: Thu, 3 Feb 2011 15:36:23 +0000 (-0500) Subject: Do not handle SIGARLM specially, just pass it through. X-Git-Tag: SUDO_1_7_5~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5dc5433d3c5945fbe91fd4666499439d9a943196;p=sudo Do not handle SIGARLM specially, just pass it through. --HG-- branch : 1.7 --- diff --git a/exec.c b/exec.c index ea1eba3fa..0c340f93c 100644 --- 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); diff --git a/exec_pty.c b/exec_pty.c index 328fca857..68edc11a6 100644 --- a/exec_pty.c +++ b/exec_pty.c @@ -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;