Re: ignore(SIGPIPE) in gsm



Hi!

I implemented short patch to remove SIG_IGN handler from SIGPIPE before
exec. But there is also the same problem with panel, and it looks like
source of it is Orbit. I am going to join Orbit list, and lurk a bit
about CORBA, orbs, etc.

P.S. Patch is attached, I don't have CVS account, so please commit it.

Regards,
Tomislav


-- 
To unsubscribe: mail gnome-devel-list-request@gnome.org with
"unsubscribe"
as the Subject.
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-core/gsm/ChangeLog,v
retrieving revision 1.83
diff -u -r1.83 ChangeLog
--- ChangeLog	1999/03/07 14:27:36	1.83
+++ ChangeLog	1999/03/08 13:25:59
@@ -1,3 +1,8 @@
+1999-03-08  Tomislav Vujec <tvujec@carnet.hr>
+
+	* manager.c (run_command): added wrapper for gnome_execute_async, to
+	default SIGPIPE before exec, and restore to SIG_IGN after it
+
 1999-03-02  Martin Baulig  <martin@home-of-linux.org>
 
 	* default.wm.in: New file. We install this in $(datadir) and
Index: manager.c
===================================================================
RCS file: /cvs/gnome/gnome-core/gsm/manager.c,v
retrieving revision 1.41
diff -u -r1.41 manager.c
--- manager.c	1999/02/16 21:33:41	1.41
+++ manager.c	1999/03/08 13:26:58
@@ -18,6 +18,7 @@
    02111-1307, USA.  */
 
 #include <string.h>
+#include <signal.h>
 #include <stdlib.h>
 
 #include <gnome.h>
@@ -163,6 +164,7 @@
   int argc, envc, envpc, pid = -1;
   gboolean def, envd;
   char **argv, *dir, prefix[1024], **envv, **envp;
+  struct sigaction act;
   
   if (find_vector_property (client, command, &argc, &argv))
     {
@@ -186,9 +188,19 @@
 	  envpc = 0;
 	  envp = NULL;
 	}
+
+      act.sa_handler = SIG_DFL;
+      sigemptyset (& act.sa_mask);
+      act.sa_flags = 0;
+
+      sigaction (SIGPIPE, &act, NULL);
       
       pid = gnome_execute_async_with_env (dir, argc, argv, envpc, envp);
 
+      act.sa_handler = SIG_IGN;
+
+      sigaction (SIGPIPE, &act, NULL);
+      
       if (envp)
 	free_vector (envpc, envp);
       if (dir)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]