script: fix spurious exit from input read loop on EINTR.

This commit is contained in:
Csaba Kos 2014-05-30 18:40:15 +09:00 committed by Karel Zak
parent 26ed9fb872
commit 578a1691f6
1 changed files with 2 additions and 1 deletions

View File

@ -327,6 +327,7 @@ doinput(void) {
while (die == 0) {
FD_SET(STDIN_FILENO, &readfds);
errno = 0;
/* wait for input or signal (including SIGCHLD) */
if ((cc = pselect(STDIN_FILENO + 1, &readfds, NULL, NULL, NULL,
&unblock_mask)) > 0) {
@ -348,7 +349,7 @@ doinput(void) {
}
resized = 0;
} else if (cc <= 0) {
} else if (cc <= 0 && errno != EINTR) {
errsv = errno;
break;
}