From: Paul Mackerras Date: Sun, 24 Oct 2004 23:18:50 +0000 (+0000) Subject: Tolerate EINTR on tcsetattr in set_up_tty - just retry. X-Git-Tag: ppp-2.4.7~234 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=34592086521ec3bdf28b873eecabb03e271061d3;p=ppp.git Tolerate EINTR on tcsetattr in set_up_tty - just retry. --- diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 68e0584..d7135c3 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -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);