summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 2baad8e..908fcee 100644
--- a/src/main.c
+++ b/src/main.c
@@ -167,6 +167,10 @@ static void BarMainHandleUserInput (BarApp_t *app) {
curFd = app->ctlFd;
}
buf = fgetc (curFd);
+ if (buf == EOF) {
+ /* select() is going wild if fdset contains EOFed fd's */
+ FD_CLR (fileno (curFd), &app->readSet);
+ }
size_t i;
for (i = 0; i < BAR_KS_COUNT; i++) {