Check return value of dispatch_pending_signals() in case we received

SIGINT or SIGQUIT before executing the command.
This commit is contained in:
Todd C. Miller
2017-04-07 08:38:56 -06:00
parent ec5b78335f
commit c6f9f06c45

View File

@@ -205,7 +205,10 @@ sudo_execute(struct command_details *details, struct command_status *cstat)
{
debug_decl(sudo_execute, SUDO_DEBUG_EXEC)
dispatch_pending_signals(cstat);
if (dispatch_pending_signals(cstat) != 0) {
/* Killed by SIGINT or SIGQUIT */
debug_return_int(0);
}
/* If running in background mode, fork and exit. */
if (ISSET(details->flags, CD_BACKGROUND)) {