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

Re: New dh_gconf



Le mar 15/06/2004 à 11:40, Ross Burton a écrit :
> Hi all,
> 
> Attached is a new dh_gconf and relevant maintainer scripts.  If people
> could have a look over it and check it does the right thing etc, I'll
> mail it to Joey.
> 
> Josselin is currently looking at patching gconfd so that sending a HUP
> to gconfd will restart it without killing it, which would be much nicer
> than the ugly kill I'm currently using.

You will find attached the patch I'm using, it seems to work fine. Your
script only needs to send kill -HUP `pidof gconfd-2`, so that's not a
big change. It is safe to use it with the current gconf2 packages too,
as SIGHUP currently equals to SIGTERM in the signal handler.

The corresponding package is also available on the alioth repository:
http://pkg-gnome.alioth.debian.org/debian/pool/g/gconf2/
-- 
 .''`.           Josselin Mouette        /\./\
: :' :           josselin.mouette@ens-lyon.org
`. `'                        joss@debian.org
  `-  Debian GNU/Linux -- The power of freedom
--- GConf-2.6.1/gconf/gconfd.c.orig	2004-06-15 11:45:14.000000000 +0200
+++ GConf-2.6.1/gconf/gconfd.c	2004-06-15 11:56:06.000000000 +0200
@@ -397,7 +397,6 @@
     break;
 
   case SIGTERM:
-  case SIGHUP:
     enter_shutdown ();
 
     /* let the fatal signals interrupt us */
@@ -410,6 +409,18 @@
       gconf_main_quit ();
     break;
 
+  case SIGHUP:
+    --in_fatal;
+
+    gconf_log (GCL_INFO,
+               _("Received signal %d, reloading database"), signo);
+    
+    /* Regenerate the databases from the default sources */
+    shutdown_databases ();
+    init_databases ();
+    gconf_server_load_sources ();
+    break;
+    
   case SIGUSR1:
     --in_fatal;
     

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=


Reply to: