[collectd] [PATCH] collectdmon: Do not block SIGCHLD.

Sebastian Harl sh at tokkee.org
Thu Oct 2 15:25:10 CEST 2008


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 <sh at tokkee.org>
---
 src/collectdmon.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/src/collectdmon.c b/src/collectdmon.c
index e496eb0..015344f 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;
 
-- 
1.6.0.1.216.g1b23a

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20081002/78db688b/attachment.pgp 


More information about the collectd mailing list