Sophie

Sophie

distrib > Mandriva > 2009.1 > x86_64 > by-pkgid > c436ea48e06e8a3eb9c38736b60961a0 > files > 6

wireshark-1.0.7-2mdv2009.1.src.rpm

--- wireshark-1.0.0/capture_opts.c	2008-03-29 18:27:02.000000000 +0100
+++ wireshark-1.0.0.new/capture_opts.c	2008-08-04 09:41:02.000000000 +0200
@@ -59,6 +59,7 @@
 # include "inet_v6defs.h"
 #endif
 
+#include <signal.h>
 #include <glib.h>
 
 #include <epan/packet.h>
@@ -755,6 +756,14 @@
             "Dropped");
     }
 
+#ifndef _WIN32
+    /* handle SIGPIPE signal to default action */
+    struct sigaction act;
+    act.sa_handler = SIG_DFL;
+    sigemptyset(&act.sa_mask);
+    sigaction(SIGPIPE,&act,NULL);
+#endif	
+
     while (1) {    /* XXX - Add signal handling? */
         for (stat_entry = g_list_first(stat_list); stat_entry != NULL; stat_entry = g_list_next(stat_entry)) {
             if_stat = stat_entry->data;