From: Todd C. Miller Date: Sun, 11 Oct 2009 12:42:03 +0000 (+0000) Subject: Apparently we need to send SIGSTOP to the command as well as ourself X-Git-Tag: SUDO_1_7_3~245 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09a7bb78fec94c3f9f14d82bb65408fc37d64ad6;p=sudo Apparently we need to send SIGSTOP to the command as well as ourself when we get SIGTSTP, the kernel doesn't automatically stop the process for us. --- diff --git a/script.c b/script.c index abc08ec1a..b6dffe5e5 100644 --- a/script.c +++ b/script.c @@ -794,9 +794,8 @@ sigrelay(signo) } /* Relay signal back to parent for its tty. */ kill(parent, signo); - /* Suspend self, parent will continue us when it is time. */ - /* XXX - want to be able to handle SIGSTOP too */ - kill(getpid(), SIGSTOP); + /* Suspend self and command, parent will continue us when it is time. */ + killpg(getpid(), SIGSTOP); errno = serrno; }