Skip to content

Commit

Permalink
Added signal( SIGPIPE, SIG_IGN ) in gmetad and gmond on advice by Lei…
Browse files Browse the repository at this point in the history
…f Nixon
  • Loading branch information
massie committed Oct 30, 2002
1 parent 61719e3 commit 6560d4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions monitor-core/gmetad/gmetad.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>
Expand Down Expand Up @@ -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");

Expand Down
4 changes: 4 additions & 0 deletions monitor-core/gmond/gmond.c
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 6560d4e

Please sign in to comment.