From ce9863358a0b11c64a794378dd82d74c6bf2a1c4 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 23 Apr 2012 14:56:31 -0400 Subject: [PATCH] Add missing initialization of a sigaction structure when I/O logging. Fixes a potential problem when suspending the command. --- src/exec_pty.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/exec_pty.c b/src/exec_pty.c index ba77b014c..001184790 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -334,6 +334,9 @@ suspend_parent(int signo) } /* Suspend self and continue child when we resume. */ + zero_bytes(&sa, sizeof(sa)); + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_INTERRUPT; /* do not restart syscalls */ sa.sa_handler = SIG_DFL; sigaction(signo, &sa, &osa); sudo_debug_printf(SUDO_DEBUG_INFO, "kill parent %d", signo); -- 2.50.1