summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Prakash Jana <engineerarun@gmail.com>2020-02-15 19:11:53 +0530
committerArun Prakash Jana <engineerarun@gmail.com>2020-02-15 19:11:53 +0530
commit48e2eb45e9487c039a9714e5085eb9b32caa1f46 (patch)
tree27bdc13858cb5930c09ed2adc189519dc2fb1351
parent58d583c629f01ec09f07d4016d6ebfc99ab951ca (diff)
Handle ^D
-rw-r--r--src/bcal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bcal.c b/src/bcal.c
index 6e3412b..b98bbca 100644
--- a/src/bcal.c
+++ b/src/bcal.c
@@ -2114,6 +2114,9 @@ int main(int argc, char **argv)
printf("q/double Enter -> quit, ? -> help\n");
while ((tmp = readline(prompt)) != NULL) {
+ if (!tmp)
+ exit(0);
+
/* Quit on double Enter */
if (tmp[0] == '\0') {
if (enters == 1) {