aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--mongotimer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mongotimer.c b/mongotimer.c
index a59e9c0..5bf9e0f 100644
--- a/mongotimer.c
+++ b/mongotimer.c
@@ -151,6 +151,8 @@ display_stopwatch(int timerfd)
if (timerfd_settime(timerfd, 0, &old_time, NULL))
goto fail;
}
+ } else if (c == 'q') {
+ goto out;
}
}
}
@@ -256,6 +258,9 @@ display_timer(int timerfd, int64_t time, int exit_on_zero)
if (timerfd_settime(timerfd, 0, &old_time, NULL))
goto fail;
}
+ } else if (c == 'q') {
+ caught_sigterm = 1;
+ goto out;
}
}
}