diff --git a/monitor-core/gmetad/gmetad.c b/monitor-core/gmetad/gmetad.c index b74a17c72..7fd16d42a 100644 --- a/monitor-core/gmetad/gmetad.c +++ b/monitor-core/gmetad/gmetad.c @@ -1,6 +1,7 @@ /* $Id$ */ #include #include +#include #include #include #include @@ -112,6 +113,9 @@ main ( int argc, char *argv[] ) srand(52336789); + /* Ignore SIGPIPE */ + signal( SIGPIPE, SIG_IGN ); + if (cmdline_parser (argc, argv, &args_info) != 0) err_quit("command-line parser error"); diff --git a/monitor-core/gmond/gmond.c b/monitor-core/gmond/gmond.c index 54fb8851d..a264419cf 100644 --- a/monitor-core/gmond/gmond.c +++ b/monitor-core/gmond/gmond.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "metric.h" #include #ifdef HAVE_SYS_TYPES_H @@ -167,6 +168,9 @@ main ( int argc, char *argv[] ) srand(1); + /* Ignore any SIGPIPE signals */ + signal( SIGPIPE, SIG_IGN ); + if(! gmond_config.mcast_if_given ) { entry = get_first_multicast_interface();