From 1b032c687deba56230f89ff5217e0a0ea445698f Mon Sep 17 00:00:00 2001 From: Russell Coker Date: Sun, 24 Nov 2002 12:02:02 +0000 Subject: [PATCH] Added a fix for a situation where pppd would hang indefinately on exit. --- pppd/sys-linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index c86a516..5751651 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -517,7 +517,10 @@ void tty_disestablish_ppp(int tty_fd) * 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 */ @@ -537,6 +540,7 @@ void tty_disestablish_ppp(int tty_fd) warn("Couldn't restore device fd flags: %m"); } } +flushfailed: initfdflags = -1; generic_disestablish_ppp(tty_fd); -- 2.39.2