xread: retry after poll on EAGAIN/EWOULDBLOCK
commitc22f6202052ca84c68df4fbb16e42c826d429558
authorEric Wong <e@80x24.org>
Mon, 27 Jun 2016 03:56:35 +0000 (27 03:56 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Jun 2016 15:33:21 +0000 (27 08:33 -0700)
tree7e0c65852f2d70b021a0e290287b074d738e9886
parent2a73b3dad09ef162eb5917e9e0d01d7c306f6b35
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>
wrapper.c