From: Todd C. Miller Date: Fri, 20 May 2016 14:12:46 +0000 (-0600) Subject: In pty_close(), call del_io_events with the SUDO_EVLOOP_ONCE flag X-Git-Tag: SUDO_1_8_17^2~45 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=994f86b40fac6773cef9168915b1aad575624629;p=sudo In pty_close(), call del_io_events with the SUDO_EVLOOP_ONCE flag so the event loop will exit after a single run through. Otherwise, we may hang at exit on non-BSD systems. --- diff --git a/src/exec_pty.c b/src/exec_pty.c index 57a2fb294..527b581cc 100644 --- a/src/exec_pty.c +++ b/src/exec_pty.c @@ -893,7 +893,7 @@ pty_close(struct command_status *cstat) (void) fcntl(io_fds[SFD_USERTTY], F_SETFL, n); } } - del_io_events(0); + del_io_events(SUDO_EVLOOP_ONCE); /* Free I/O buffers. */ while ((iob = SLIST_FIRST(&iobufs)) != NULL) {