aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.c b/main.c
index ca4d2cf..5353873 100644
--- a/main.c
+++ b/main.c
@@ -1316,7 +1316,10 @@ static void get_user_input __P0 (void)
while ((j = tty_read(c, chunk)) < 0 && errno == EINTR)
;
- if (j <= 0 || (chunk == 1 && j != chunk))
+ if (j == 0)
+ return;
+
+ if (j < 0 || (chunk == 1 && j != chunk))
syserr("read from tty");
c[chunk] = '\0';