when resuming command, send SIGCONT to its pgrp not just pid
This commit is contained in:
2
script.c
2
script.c
@@ -646,7 +646,7 @@ script_child(path, argv, rbac_enabled)
|
|||||||
/* Stop parent, self and then resume child when we come back */
|
/* Stop parent, self and then resume child when we come back */
|
||||||
kill(parent, WSTOPSIG(status));
|
kill(parent, WSTOPSIG(status));
|
||||||
kill(getpid(), SIGSTOP);
|
kill(getpid(), SIGSTOP);
|
||||||
kill(child, SIGCONT);
|
killpg(child, SIGCONT);
|
||||||
} else {
|
} else {
|
||||||
/* Child died, set exit code accordingly. */
|
/* Child died, set exit code accordingly. */
|
||||||
if (WIFEXITED(status))
|
if (WIFEXITED(status))
|
||||||
|
Reference in New Issue
Block a user