diff --git a/tgetpass.c b/tgetpass.c index b266c4f26..bb7cf3c27 100644 --- a/tgetpass.c +++ b/tgetpass.c @@ -107,8 +107,6 @@ __unused static const char rcsid[] = "$Sudo$"; # define tcsetattr(f, a, t) ioctl(f, a, t) # undef TCSAFLUSH # define TCSAFLUSH TCSETAF -# undef TCSANOW -# define TCSANOW TCSETA # else # undef termios # define termios sgttyb @@ -117,8 +115,6 @@ __unused static const char rcsid[] = "$Sudo$"; # define tcsetattr(f, a, t) ioctl(f, a, t) # undef TCSAFLUSH # define TCSAFLUSH TIOCSETP -# undef TCSANOW -# define TCSANOW TIOCSETN # endif /* HAVE_TERMIO_H */ #endif /* HAVE_TERMIOS_H */ @@ -202,7 +198,7 @@ restart: /* Restore old tty settings and signals. */ if (memcmp(&term, &oterm, sizeof(term)) != 0) { - while (tcsetattr(input, TCSANOW|TCSASOFT, &oterm) == -1 && + while (tcsetattr(input, TCSAFLUSH|TCSASOFT, &oterm) == -1 && errno == EINTR) continue; }