From: Todd C. Miller Date: Tue, 24 Aug 2010 12:42:47 +0000 (-0400) Subject: When not logging I/O install a handler for SIGCONT and deliver it X-Git-Tag: SUDO_1_8_0~272 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cef2bb5b0d8c3aaa358735ca3fb1986dc44a778;p=sudo When not logging I/O install a handler for SIGCONT and deliver it to the command upon resume. Fixes bugzilla #431 --- diff --git a/src/exec.c b/src/exec.c index 76875e44b..d2e80291c 100644 --- a/src/exec.c +++ b/src/exec.c @@ -96,8 +96,15 @@ static int fork_cmnd(struct command_details *details, char *argv[], char *envp[], int sv[2]) { struct command_status cstat; + sigaction_t sa; int pid; + zero_bytes(&sa, sizeof(sa)); + sigemptyset(&sa.sa_mask); + sa.sa_flags = SA_INTERRUPT; /* do not restart syscalls */ + sa.sa_handler = handler; + sigaction(SIGCONT, &sa, NULL); + pid = fork(); switch (pid) { case -1: