diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-09-12 03:30:54 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-09-12 03:30:54 +0200 |
commit | 16126708a9b836b39d689211f6b1952abe72c3ae (patch) | |
tree | 8fccf55a539baa9a8a455ea160a5bbb4be08efb3 /src/mongoclock.c | |
parent | port to c + reduce flicker + use timerfd (diff) | |
download | mongotimer-16126708a9b836b39d689211f6b1952abe72c3ae.tar.gz mongotimer-16126708a9b836b39d689211f6b1952abe72c3ae.tar.bz2 mongotimer-16126708a9b836b39d689211f6b1952abe72c3ae.tar.xz |
signals will interrupt read on timer, so we do not have to wait for the timer to expire to exit
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/mongoclock.c')
-rw-r--r-- | src/mongoclock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongoclock.c b/src/mongoclock.c index 781b7b4..8ff3676 100644 --- a/src/mongoclock.c +++ b/src/mongoclock.c @@ -237,6 +237,10 @@ int main(int argc, char* argv[]) signal(SIGQUIT, sigterm); signal(SIGINT, sigterm); signal(SIGWINCH, sigwinch); + siginterrupt(SIGTERM, 1); + siginterrupt(SIGQUIT, 1); + siginterrupt(SIGINT, 1); + siginterrupt(SIGWINCH, 1); while (!caught_sigterm) { |