diff options
-rw-r--r-- | epan/epan.c | 10 | ||||
-rw-r--r-- | wireshark-qt.cpp | 9 |
2 files changed, 10 insertions, 9 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(); diff --git a/wireshark-qt.cpp b/wireshark-qt.cpp index cdb5c2700c..7b73e204fa 100644 --- a/wireshark-qt.cpp +++ b/wireshark-qt.cpp @@ -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); |