When not logging I/O install a handler for SIGCONT and deliver it

to the command upon resume.  Fixes bugzilla #431
This commit is contained in:
Todd C. Miller
2010-08-24 08:42:47 -04:00
parent 88f9fea400
commit 2cef2bb5b0

View File

@@ -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: