Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-27 06:56:35 +0300
committerJunio C Hamano <gitster@pobox.com>2016-06-27 18:33:21 +0300
commitc22f6202052ca84c68df4fbb16e42c826d429558 (patch)
tree7e0c65852f2d70b021a0e290287b074d738e9886 /wrapper.c
parent2a73b3dad09ef162eb5917e9e0d01d7c306f6b35 (diff)
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: 1079c4be0b720 ("xread: poll on non blocking fds") Signed-off-by: Eric Wong <e@80x24.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wrapper.c b/wrapper.c
index 1770efac8e..9b20eb9351 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -252,6 +252,7 @@ ssize_t xread(int fd, void *buf, size_t len)
* call to read(2).
*/
poll(&pfd, 1, -1);
+ continue;
}
}
return nr;