]> git.ozlabs.org Git - ppp.git/commitdiff
Tolerate EINTR on tcsetattr in set_up_tty - just retry.
authorPaul Mackerras <paulus@samba.org>
Sun, 24 Oct 2004 23:18:50 +0000 (23:18 +0000)
committerPaul Mackerras <paulus@samba.org>
Sun, 24 Oct 2004 23:18:50 +0000 (23:18 +0000)
pppd/sys-linux.c

index 68e0584aeecb641d914f0b9f3b391f18316deb1c..d7135c3da8738d1528e973694b30364af1faa266 100644 (file)
@@ -956,8 +956,8 @@ void set_up_tty(int tty_fd, int local)
            fatal("Baud rate for %s is 0; need explicit baud rate", devnam);
     }
 
-    if (tcsetattr(tty_fd, TCSAFLUSH, &tios) < 0)
-       if (!ok_error(errno))
+    while (tcsetattr(tty_fd, TCSAFLUSH, &tios) < 0 && !ok_error(errno))
+       if (errno != EINTR)
            fatal("tcsetattr: %m (line %d)", __LINE__);
 
     baud_rate    = baud_rate_of(speed);