]> granicus.if.org Git - sudo/commitdiff
Add missing initialization of a sigaction structure when I/O logging.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 23 Apr 2012 18:56:48 +0000 (14:56 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Mon, 23 Apr 2012 18:56:48 +0000 (14:56 -0400)
Fixes a potential problem when suspending the command.

--HG--
branch : 1.7

exec_pty.c

index 4020b3dc52f0f1e5c4770882f95e13311856ffb1..ee26aa1ffa78c82fdf7fb49b425ed59b69e76f9e 100644 (file)
@@ -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)