From: Sebastian Harl Date: Thu, 2 Oct 2008 13:25:10 +0000 (+0200) Subject: collectdmon: Do not block SIGCHLD. X-Git-Tag: collectd-4.4.4~17 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=980abcf9a631fedc82920942e4c845315c49ba9a;p=collectd.git collectdmon: Do not block SIGCHLD. There is no reason to do so as we do not need to synchronize any waitpid() calls. In fact, doing so was wrong because waitpid() should then return with an error according to POSIX. This was still working so far since waitpid() would not return until all children terminated and this is all we really care about. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/collectdmon.c b/src/collectdmon.c index e496eb07..015344f9 100644 --- a/src/collectdmon.c +++ b/src/collectdmon.c @@ -331,12 +331,6 @@ int main (int argc, char **argv) return 1; } - sigaddset (&sa.sa_mask, SIGCHLD); - if (0 != sigprocmask (SIG_BLOCK, &sa.sa_mask, NULL)) { - syslog (LOG_ERR, "Error: sigprocmask() failed: %s", strerror (errno)); - return 1; - } - while (0 == loop) { int status = 0;