package wireshark
tags 478169 patch
forwarded 478169 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1740
user [EMAIL PROTECTED]
usertag 478169 intrepid ubuntu-patch
thanks

Hi,

This bug is reported in Ubuntu at 

  https://bugs.launchpad.net/bugs/198884

and upstream at

  https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1740

Sergio Barjola investigated the problem and found this:



looking at the process: gksudo---wireshark---dumpcap
I've found that gksudo is ignoring SIGPIPE signal, (ps -eo pid,ignored),
so all childs process too, unless they change with sigaction.

Enable default action of SIGPIPE before gksudo create the child process
works for me. (libgksu.c line 2506).



I've looking for why is SIGPIPE ignored in gksu process, and I found
that it's caused by communication with gconfd server.
When a application connect to the gconfd daemon to get properties, the
underlaying communication with CORBA it's ignoring SIGPIPE signal to
avoid that if server crash, the process receive the signal and
terminate.

package: liborbit2 1:2.14.12-0.1
file: linc2/src/linc.c (line: 247 see comment why is signal ignored)..


and came up with a patch which he says fixes it. I attach the patch
to this mail. Please review it.

Thanks,

James


--- 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;

Reply via email to