aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-03-08 09:32:51 -0800
committerGerald Combs <gerald@wireshark.org>2018-03-08 18:24:45 +0000
commitdbfd53cd60ed9f748b25a293a36893ee828f89d4 (patch)
treef487ec6dcab7c42cf18e103c5a113bba5f357109 /epan
parentce46a023cf233b376107f46709f7b2a42a0c3c3f (diff)
epan: Ignore SIGPIPE.
We need to ignore SIGPIPE whenever we use maxmind_db. Do so in epan_init. Ping-Bug: 14494 Change-Id: I4372935e371a94c02a79050d59b2e3ee1ba04fee Reviewed-on: https://code.wireshark.org/review/26369 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan')
-rw-r--r--epan/epan.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c
index a1a9240a81..365ddd29ac 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -85,6 +85,10 @@
#include <libxml/parser.h>
#endif
+#ifndef _WIN32
+#include <signal.h>
+#endif
+
static GSList *epan_register_all_procotols = NULL;
static GSList *epan_register_all_handoffs = NULL;
@@ -223,6 +227,12 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da
xmlInitParser();
LIBXML_TEST_VERSION;
#endif
+
+#ifndef _WIN32
+ // We might receive a SIGPIPE due to maxmind_db.
+ signal(SIGPIPE, SIG_IGN);
+#endif
+
TRY {
tap_init();
prefs_init();