From 81dec53570e3e2621af8c652aceb0d59ca316431 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 20 Aug 2008 21:40:44 -0400 Subject: [PATCH] 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 Signed-off-by: Jonas Fonseca --- tig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tig.c b/tig.c index 6b111e4..8362ecf 100644 --- a/tig.c +++ b/tig.c @@ -2392,7 +2392,7 @@ update_view(struct view *view) update_view_title(view); check_pipe: - if (ferror(view->pipe)) { + if (ferror(view->pipe) && errno != 0) { report("Failed to read: %s", strerror(errno)); end_update(view, TRUE); -- 2.32.0.93.g670b81a890