This signal may be sent if a client closes the connection before reading
the reply. We don't want to die in this case.. ;)
memset (&sa, 0, sizeof (sa));
sa.sa_handler = sig_term_handler;
sigaction (SIGINT, &sa, NULL);
memset (&sa, 0, sizeof (sa));
sa.sa_handler = sig_term_handler;
sigaction (SIGINT, &sa, NULL);
+
+ memset (&sa, 0, sizeof (sa));
+ sa.sa_handler = SIG_IGN;
+ sigaction (SIGPIPE, &sa, NULL);
}
openlog ("rrdd", LOG_PID, LOG_DAEMON);
}
openlog ("rrdd", LOG_PID, LOG_DAEMON);