diff options
author | Eric Leblond <eric@inl.fr> | 2008-11-30 11:22:19 +0100 |
---|---|---|
committer | Eric Leblond <eric@inl.fr> | 2008-12-09 01:19:25 +0100 |
commit | 8040dcd59097d54f94447b36edebfcf3f14edfdd (patch) | |
tree | e85cbb4a928064dd58a1d0a521bc7e3e67afcd53 | |
parent | 1a43b8095f1c898e9a601ab7f777daa0c85a429a (diff) |
Add SIGINT to list of terminal signal.
This patch modifies ulogd to intercept SIGINT signal
and quit nicely when this signal is received.
-rw-r--r-- | src/ulogd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ulogd.c b/src/ulogd.c index d193b26..2f80913 100644 --- a/src/ulogd.c +++ b/src/ulogd.c @@ -980,7 +980,7 @@ static void stop_pluginstances() static void sigterm_handler(int signal) { - ulogd_log(ULOGD_NOTICE, "sigterm received, exiting\n"); + ulogd_log(ULOGD_NOTICE, "Terminal signal received, exiting\n"); deliver_signal_pluginstances(signal); @@ -1173,6 +1173,7 @@ int main(int argc, char* argv[]) } signal(SIGTERM, &sigterm_handler); + signal(SIGINT, &sigterm_handler); signal(SIGHUP, &signal_handler); signal(SIGALRM, &signal_handler); signal(SIGUSR1, &signal_handler); |