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>
Eric Wong committed
Jun 27, 2016 at 03:56 UTC
c22f6202052ca84c68df4fbb16e42c826d429558
1 file changed
+1
wrapper.c
+1
@@ -252,6 +252,7 @@ ssize_t xread(int fd, void *buf, size_t len)
252
* call to read(2).
253
*/
254
poll(&pfd, 1, -1);
255
+ continue;
256
}
257
}
258
return nr;