flush queue before restoring line discipline to try to
authorPaul Mackerras <paulus@samba.org>
Fri, 16 Apr 1999 11:33:40 +0000 (11:33 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 16 Apr 1999 11:33:40 +0000 (11:33 +0000)
eliminate hangs

pppd/sys-linux.c

index 33e338d29a46546b761e9e9ea7adf3f4ebc2c9a7..c63ac9a5d9a0cf8a9918b1941b5f6f653adaea39 100644 (file)
@@ -388,6 +388,7 @@ void disestablish_ppp(int tty_fd)
 /*
  * Restore the previous line discipline
  */
+       tcflush(tty_fd, TCIOFLUSH);
        if (ioctl(tty_fd, TIOCSETD, &tty_disc) < 0) {
            if ( ! ok_error (errno))
                error("ioctl(TIOCSETD, N_TTY): %m");