Package: gphotocoll
Version: 0.7-10

Hi,

after starting and quitting an external application (e.g. gimp)
gphotocoll doesn't do a wait() and the process table fills up with
zombies. The appended patch installs a sig handler, which acts as a
grim reaper.  

Michael

--- t/gphotocoll-0.7/src/main.c 2001-03-09 23:11:27.000000000 +0100
+++ gphotocoll/src/main.c       2006-03-26 14:20:12.000000000 +0200
@@ -7,6 +7,8 @@
 #  include <config.h>
 #endif
 
+#include <sys/signal.h>
+#include <sys/wait.h>
 #include <gnome.h>
 
 #include "gpc_app.h"
@@ -17,6 +19,16 @@
 #include "pg_connection.h"
 
 
+static void
+chld_term( int x )
+{
+    do
+       x = waitpid( -1, 0, WNOHANG );
+    while ( x > 0 );
+
+} /* chld_term */
+
+
 int
 main (int argc, char *argv[])
 {
@@ -25,6 +37,8 @@
   textdomain (PACKAGE);
 #endif
 
+  signal( SIGCLD, chld_term ); 
+
   gnome_init (PACKAGE, VERSION, argc, argv);
 
   /* First, we try to recreate connection from stored params 
@@ -71,6 +85,7 @@
   gpc_app = create_gpc_app ();
   gtk_widget_show (gpc_app);
 
+
   gtk_main ();
 
   return 0;



-- 
biff4emacsen - A biff-like tool for (X)Emacs
http://www.c0t0d0s0.de/biff4emacsen/biff4emacsen.html



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to