X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=699041a3d183375b9604f86acb1fe6e772306b17;hb=f3610533206238bf4fcb72c76e9a07517d8bc64b;hp=cdaf79a0b04e741aee314aafb90921ff1fe0ef9b;hpb=21ab7512825cf8177d5eee5101344b45d0854610;p=collectd.git diff --git a/src/exec.c b/src/exec.c index cdaf79a0..699041a3 100644 --- a/src/exec.c +++ b/src/exec.c @@ -27,6 +27,7 @@ #define _BSD_SOURCE /* For setgroups */ #include "collectd.h" + #include "common.h" #include "plugin.h" @@ -346,7 +347,6 @@ static void reset_signal_mask (void) /* {{{ */ { sigset_t ss; - memset (&ss, 0, sizeof (ss)); sigemptyset (&ss); sigprocmask (SIG_SETMASK, &ss, /* old mask = */ NULL); } /* }}} void reset_signal_mask */ @@ -804,10 +804,10 @@ static void *exec_notification_one (void *arg) /* {{{ */ static int exec_init (void) /* {{{ */ { - struct sigaction sa; + struct sigaction sa = { + .sa_handler = sigchld_handler + }; - memset (&sa, '\0', sizeof (sa)); - sa.sa_handler = sigchld_handler; sigaction (SIGCHLD, &sa, NULL); return (0);