зеркало из https://github.com/microsoft/git.git
xread: retry after poll on EAGAIN/EWOULDBLOCK
We should continue to loop after EAGAIN/EWOULDBLOCK as the
intent of xread is to try until there is available data,
EOF, or an unrecoverable error.
Fixes: 1079c4be0b
("xread: poll on non blocking fds")
Signed-off-by: Eric Wong <e@80x24.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
2a73b3dad0
Коммит
c22f620205
|
@ -252,6 +252,7 @@ ssize_t xread(int fd, void *buf, size_t len)
|
||||||
* call to read(2).
|
* call to read(2).
|
||||||
*/
|
*/
|
||||||
poll(&pfd, 1, -1);
|
poll(&pfd, 1, -1);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nr;
|
return nr;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче