summaryrefslogtreecommitdiff
path: root/crypto/openssh/openbsd-compat/readpassphrase.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/openbsd-compat/readpassphrase.c')
-rw-r--r--crypto/openssh/openbsd-compat/readpassphrase.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/openssh/openbsd-compat/readpassphrase.c b/crypto/openssh/openbsd-compat/readpassphrase.c
index 4ee1be5de283d..eb060bdbfbc05 100644
--- a/crypto/openssh/openbsd-compat/readpassphrase.c
+++ b/crypto/openssh/openbsd-compat/readpassphrase.c
@@ -137,8 +137,11 @@ restart:
(void)write(output, "\n", 1);
/* Restore old terminal settings and signals. */
- if (memcmp(&term, &oterm, sizeof(term)) != 0)
- (void)tcsetattr(input, _T_FLUSH, &oterm);
+ if (memcmp(&term, &oterm, sizeof(term)) != 0) {
+ while (tcsetattr(input, _T_FLUSH, &oterm) == -1 &&
+ errno == EINTR)
+ continue;
+ }
(void)sigaction(SIGALRM, &savealrm, NULL);
(void)sigaction(SIGHUP, &savehup, NULL);
(void)sigaction(SIGINT, &saveint, NULL);