diff options
Diffstat (limited to 'cethcan/main.c')
-rw-r--r-- | cethcan/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cethcan/main.c b/cethcan/main.c index a870ca2..961c543 100644 --- a/cethcan/main.c +++ b/cethcan/main.c @@ -8,6 +8,7 @@ int main(int argc, char **argv) const char *cfgfile = "cethcan.json"; json_error_t je; json_t *config; + struct sigaction sa; do { optch = getopt(argc, argv, "c:"); @@ -79,6 +80,13 @@ int main(int argc, char **argv) json_decref(config); + memset(&sa, 0, sizeof(sa)); + sa.sa_handler = SIG_IGN; + sigaction(SIGPIPE, &sa, NULL); + sigaction(SIGHUP, &sa, NULL); + sigaction(SIGUSR1, &sa, NULL); + sigaction(SIGUSR2, &sa, NULL); + event_base_loop(ev_base, 0); return 0; } |