From 34592086521ec3bdf28b873eecabb03e271061d3 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Sun, 24 Oct 2004 23:18:50 +0000 Subject: [PATCH] Tolerate EINTR on tcsetattr in set_up_tty - just retry. --- pppd/sys-linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.2