]> andersk Git - openssh.git/commitdiff
nicer fix from millert@
authordjm <djm>
Tue, 24 May 2005 06:39:03 +0000 (06:39 +0000)
committerdjm <djm>
Tue, 24 May 2005 06:39:03 +0000 (06:39 +0000)
openbsd-compat/readpassphrase.c

index b5f4d1ce4fea2bffbf49a08724776182f03462e1..5138b40345c46aaec222bb1bd566ee9597df06ec 100644 (file)
@@ -137,10 +137,11 @@ restart:
                (void)write(output, "\n", 1);
 
        /* Restore old terminal settings and signals. */
-       if (memcmp(&term, &oterm, sizeof(term)) != 0)
-               for (;tcsetattr(input, _T_FLUSH, &oterm) == -1 &&
-                   errno == EINTR;)
-                       ;
+       if (memcmp(&term, &oterm, sizeof(term)) != 0) {
+               while (tcsetattr(input, TCSANOW|TCSASOFT, &oterm) == -1 &&
+                   errno == EINTR)
+                       continue;
+       }
        (void)sigaction(SIGALRM, &savealrm, NULL);
        (void)sigaction(SIGHUP, &savehup, NULL);
        (void)sigaction(SIGINT, &saveint, NULL);
This page took 0.090178 seconds and 5 git commands to generate.