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>
This commit is contained in:
parent
ce46a023cf
commit
dbfd53cd60
10
epan/epan.c
10
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();
|
||||
|
|
|
@ -11,10 +11,6 @@
|
|||
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef HAVE_GETOPT_H
|
||||
|
@ -612,11 +608,6 @@ int main(int argc, char *qt_argv[])
|
|||
wsApp->setLastOpenDir(get_persdatafile_dir());
|
||||
}
|
||||
|
||||
#ifdef Q_OS_UNIX
|
||||
// Replicates behavior in gtk_init();
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
#endif
|
||||
|
||||
set_console_log_handler();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
|
||||
qInstallMessageHandler(g_log_message_handler);
|
||||
|
|
Loading…
Reference in New Issue