Continue updates when pipe read has errno "Success"
authorJeff King <peff@peff.net>
Thu, 21 Aug 2008 01:40:44 +0000 (21:40 -0400)
committerJonas Fonseca <fonseca@diku.dk>
Fri, 22 Aug 2008 09:43:34 +0000 (11:43 +0200)
commit81dec53570e3e2621af8c652aceb0d59ca316431
tree9f2a8fe927c69ec5fbd3065f46b81196daf97aa2
parentad9f9954419b5d3f595580d5184db59a00711f92
Continue updates when pipe read has errno "Success"

When we are reading from a pipe and receive a signal, our
read call fails and ferror() returns true. The current
behavior is to call end_update and report failure. However,
we can detect this situation by checking that errno is set
to success and continue the reading process.

You can provoke this behavior by running a "tig blame" that
takes a few seconds and then resizing the terminal that tig
is running in (you should get an incomplete blame output and
the error "Failed to read: Success").

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
tig.c