Fix handling of signal forwarding when running commands in a script.

We need to forward signals from a process in the same pgrp if the
pgrp leader is not either sudo or the command itself.
This commit is contained in:
Todd C. Miller
2022-11-07 14:51:41 -07:00
parent c7071f6da0
commit 36742deec3
4 changed files with 43 additions and 32 deletions

View File

@@ -74,6 +74,7 @@ struct exec_closure {
struct sudo_event *sigwinch_event;
struct command_status *cstat;
void *intercept;
pid_t sudo_pid;
pid_t monitor_pid;
pid_t cmnd_pid;
pid_t ppgrp;