From cbe24d6c8f901560bcd168525c67cc4236374d16 Mon Sep 17 00:00:00 2001
From: Yorhel <git@yorhel.nl>
Date: Wed, 13 Jun 2018 17:16:02 +0200
Subject: [PATCH] Exit ncdu when losing input

Ought to fix https://dev.yorhel.nl/ncdu/bug/115
---
 src/main.c | 2 ++
 1 file changed, 2 insertions(+)

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;
 }
 
-- 
GitLab