]> granicus.if.org Git - sudo/commit
When the command completes, make the monitor the foreground process
authorTodd C. Miller <Todd.Miller@sudo.ws>
Fri, 1 Dec 2017 20:43:06 +0000 (13:43 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Fri, 1 Dec 2017 20:43:06 +0000 (13:43 -0700)
commitb561d0d7ddf7e16472abd03fdada1ef2381f55cc
tree730b52e5edc7a6d7ea0b2731914d0c143c465224
parent4168668f5356b0ed6f330a59de019c28ff3664ac
When the command completes, make the monitor the foreground process
group before informing the main sudo process of the command's exit
status.  This will prevent processes started by the command (which
runs in a different process group) from receiving SIGHUP since the
kernel sends SIGHUP to the foreground process group associated with
the terminal session.  The monitor has a SIGHUP handler installed
so the signal is effectively ignored.
src/exec_monitor.c