Remove signal_event from evbase before calling sudo_ev_loopexit()
when the command has exited or been killed. It is possible that we could receive another signal on the pipe if they are delivered out of order.
This commit is contained in:
@@ -603,6 +603,7 @@ dispatch_signal(struct sudo_event_base *evbase, pid_t child,
|
||||
/* Child has exited or been killed, we are done. */
|
||||
cstat->type = CMD_WSTATUS;
|
||||
cstat->val = status;
|
||||
sudo_ev_del(evbase, signal_event);
|
||||
sudo_ev_loopexit(evbase);
|
||||
goto done;
|
||||
}
|
||||
|
Reference in New Issue
Block a user