summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/readpassphrase.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsd-compat/readpassphrase.c b/openbsd-compat/readpassphrase.c
index 4ee1be5de..b5f4d1ce4 100644
--- a/openbsd-compat/readpassphrase.c
+++ b/openbsd-compat/readpassphrase.c
@@ -138,7 +138,9 @@ restart:
138 138
139 /* Restore old terminal settings and signals. */ 139 /* Restore old terminal settings and signals. */
140 if (memcmp(&term, &oterm, sizeof(term)) != 0) 140 if (memcmp(&term, &oterm, sizeof(term)) != 0)
141 (void)tcsetattr(input, _T_FLUSH, &oterm); 141 for (;tcsetattr(input, _T_FLUSH, &oterm) == -1 &&
142 errno == EINTR;)
143 ;
142 (void)sigaction(SIGALRM, &savealrm, NULL); 144 (void)sigaction(SIGALRM, &savealrm, NULL);
143 (void)sigaction(SIGHUP, &savehup, NULL); 145 (void)sigaction(SIGHUP, &savehup, NULL);
144 (void)sigaction(SIGINT, &saveint, NULL); 146 (void)sigaction(SIGINT, &saveint, NULL);