libc_noux: try read again on EAGAIN/EINTR

Issue #3541.
This commit is contained in:
Josef Söntgen 2019-10-14 17:15:53 +02:00 committed by Christian Helmuth
parent 55ab694d79
commit c79ebc93a2
1 changed files with 8 additions and 0 deletions

View File

@ -1366,6 +1366,14 @@ namespace {
errno = 0;
break;
}
/* try again */
bool const retry = (errno == EINTR
|| errno == EAGAIN
|| errno == EWOULDBLOCK);
if (errno && retry)
continue;
return -1;
}