]> granicus.if.org Git - sudo/commitdiff
Remove signal_event from evbase before calling sudo_ev_loopexit()
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 30 Aug 2014 22:24:53 +0000 (16:24 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 30 Aug 2014 22:24:53 +0000 (16:24 -0600)
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.

src/exec.c

index 275ee75852e6d958b25d0e23b98a6bd76ab634ad..8f8e389aa6ccb403f75a549f34403c00e996fe52 100644 (file)
@@ -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;
            }