Code

Merge remote-tracking branch 'github/pr/387'
[collectd.git] / src / collectdmon.c
index e496eb07a65d23138513786967fb0fb2350f6fa3..078b2eb1d2b1422acc50370406ebf48558677a18 100644 (file)
  *   Sebastian Harl <sh at tokkee.org>
  **/
 
+#if !defined(__GNUC__) || !__GNUC__
+# define __attribute__(x) /**/
+#endif
+
 #include "config.h"
 
 #include <assert.h>
@@ -197,13 +201,13 @@ static int collectd_stop (void)
        return 0;
 } /* collectd_stop */
 
-static void sig_int_term_handler (int signo)
+static void sig_int_term_handler (int __attribute__((unused)) signo)
 {
        ++loop;
        return;
 } /* sig_int_term_handler */
 
-static void sig_hup_handler (int signo)
+static void sig_hup_handler (int __attribute__((unused)) signo)
 {
        ++restart;
        return;
@@ -331,12 +335,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;