From c137ab3ecbbaf2239d641c2b742ab3fcb61a5dac Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 23 Apr 2012 14:56:48 -0400 Subject: [PATCH] Add missing initialization of a sigaction structure when I/O logging. Fixes a potential problem when suspending the command. --HG-- branch : 1.7 --- exec_pty.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exec_pty.c b/exec_pty.c index 4020b3dc5..ee26aa1ff 100644 --- a/exec_pty.c +++ b/exec_pty.c @@ -192,6 +192,9 @@ suspend_parent(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); if (killpg(ppgrp, signo) != 0) -- 2.40.0