mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 15:55:40 +00:00
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:
@@ -96,8 +96,15 @@ static int fork_cmnd(struct command_details *details, char *argv[],
|
|||||||
char *envp[], int sv[2])
|
char *envp[], int sv[2])
|
||||||
{
|
{
|
||||||
struct command_status cstat;
|
struct command_status cstat;
|
||||||
|
sigaction_t sa;
|
||||||
int pid;
|
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();
|
pid = fork();
|
||||||
switch (pid) {
|
switch (pid) {
|
||||||
case -1:
|
case -1:
|
||||||
|
Reference in New Issue
Block a user