The fix for Bug #722 contained a typo/thinko that resulted in the
exit status being 0 when a command was killed by a signal other than SIGINT. This fixes the signal handler setup so sudo will terminate with the same signal as the command. Bug #784.
This commit is contained in:
@@ -322,7 +322,7 @@ main(int argc, char *argv[], char *envp[])
|
||||
memset(&sa, 0, sizeof(sa));
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigaction(SIGINT, &sa, NULL);
|
||||
sigaction(WTERMSIG(status), &sa, NULL);
|
||||
sudo_debug_exit_int(__func__, __FILE__, __LINE__, sudo_debug_subsys,
|
||||
WTERMSIG(status) | 128);
|
||||
kill(getpid(), WTERMSIG(status));
|
||||
|
Reference in New Issue
Block a user