* Flush the tty output buffer so that the TIOCSETD doesn't hang.
*/
if (tcflush(tty_fd, TCIOFLUSH) < 0)
+ {
warn("tcflush failed: %m");
+ goto flushfailed;
+ }
/*
* Restore the previous line discipline
*/
warn("Couldn't restore device fd flags: %m");
}
}
+flushfailed:
initfdflags = -1;
generic_disestablish_ppp(tty_fd);