summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2018-06-13 17:16:02 +0200
committerYorhel <git@yorhel.nl>2018-06-13 17:16:02 +0200
commitcbe24d6c8f901560bcd168525c67cc4236374d16 (patch)
tree95f19c9a7b747d2caed090b94fec13b086e60d57
parentd15fe8d08e5daffb78d2550eb0658f31680daffe (diff)
Exit ncdu when losing input
Ought to fix https://dev.yorhel.nl/ncdu/bug/115
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 4bd08d6..3dae1e1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -103,6 +103,8 @@ int input_handle(int wait) {
}
screen_draw();
}
+ if(errno == EPIPE || errno == EBADF)
+ return 1;
return 0;
}