Permalink
Browse files

Added signal( SIGPIPE, SIG_IGN ) in gmetad and gmond on advice by Lei…

…f Nixon
  • Loading branch information...
1 parent 61719e3 commit 6560d4e36f6c2923554928f432948770565da78e massie committed Oct 30, 2002
Showing with 8 additions and 0 deletions.
  1. +4 −0 monitor-core/gmetad/gmetad.c
  2. +4 −0 monitor-core/gmond/gmond.c
@@ -1,6 +1,7 @@
/* $Id$ */
#include <stdio.h>
#include <stdlib.h>
+#include <signal.h>
#include <pthread.h>
#include <cmdline.h>
#include <ganglia/error.h>
@@ -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");
@@ -7,6 +7,7 @@
#include <ganglia/barrier.h>
#include <ganglia/become_a_nobody.h>
#include <ganglia/net.h>
+#include <signal.h>
#include "metric.h"
#include <pwd.h>
#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();

0 comments on commit 6560d4e

Please sign in to comment.