From 2cef2bb5b0d8c3aaa358735ca3fb1986dc44a778 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 24 Aug 2010 08:42:47 -0400 Subject: [PATCH] When not logging I/O install a handler for SIGCONT and deliver it to the command upon resume. Fixes bugzilla #431 --- src/exec.c | 7 +++++++ 1 file changed, 7 insertions(+) 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: -- 2.40.0