diff options
author | Christian Pointner <equinox@anytun.org> | 2010-10-03 23:14:14 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2010-10-03 23:14:14 +0000 |
commit | 61dcb322be3b7985e75597799066a0b610709b83 (patch) | |
tree | fc789c9fb043532970421cd73fb41eddca6fd15c /src | |
parent | blocking SIG_PIPE and SIG_CHLD by default (diff) |
small refactoring
Diffstat (limited to 'src')
-rw-r--r-- | src/sig_handler.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sig_handler.c b/src/sig_handler.c index dd5cff3..9f2a002 100644 --- a/src/sig_handler.c +++ b/src/sig_handler.c @@ -83,9 +83,9 @@ int signal_init() act.sa_handler = sig_handler; sigfillset(&act.sa_mask); act.sa_flags = 0; - act_ign.sa_handler = SIG_IGN; - sigfillset(&act_ign.sa_mask); - act_ign.sa_flags = 0; + ign.sa_handler = SIG_IGN; + sigfillset(&ign.sa_mask); + ign.sa_flags = 0; if((sigaction(SIGINT, &act, NULL) < 0) || (sigaction(SIGQUIT, &act, NULL) < 0) || @@ -93,8 +93,8 @@ int signal_init() (sigaction(SIGHUP, &act, NULL) < 0) || (sigaction(SIGUSR1, &act, NULL) < 0) || (sigaction(SIGUSR2, &act, NULL) < 0) || - (sigaction(SIGCHLD, &act_ign, NULL) < 0) || - (sigaction(SIGPIPE, &act_ign, NULL) < 0)) { + (sigaction(SIGCHLD, &ign, NULL) < 0) || + (sigaction(SIGPIPE, &ign, NULL) < 0)) { log_printf(ERROR, "signal handling init failed (sigaction error: %s)", strerror(errno)); close(sig_pipe_fds[0]); |