Add missing initialization of a sigaction structure when I/O logging.

Fixes a potential problem when suspending the command.
This commit is contained in:
Todd C. Miller
2012-04-23 14:56:31 -04:00
parent 9f461efd5f
commit ce9863358a

View File

@@ -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);