]> granicus.if.org Git - sudo/commitdiff
Apparently we need to send SIGSTOP to the command as well as ourself
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 11 Oct 2009 12:42:03 +0000 (12:42 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 11 Oct 2009 12:42:03 +0000 (12:42 +0000)
when we get SIGTSTP, the kernel doesn't automatically stop the process
for us.

script.c

index abc08ec1a3994feac4035061ee984ab42c5b2ff5..b6dffe5e53171b45288f1b58007be01bc10e2153 100644 (file)
--- 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;
 }