]> granicus.if.org Git - sudo/commitdiff
In pty_close(), call del_io_events with the SUDO_EVLOOP_ONCE flag
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 20 May 2016 14:12:46 +0000 (08:12 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 20 May 2016 14:12:46 +0000 (08:12 -0600)
so the event loop will exit after a single run through.  Otherwise,
we may hang at exit on non-BSD systems.

src/exec_pty.c

index 57a2fb2942bbe69bf6584459f5849a3b5825420a..527b581cc60cd446b10e6d8e6fc0f0e95667d190 100644 (file)
@@ -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) {