[Xfce4-commits] <xfce4-panel:master> Restart the panel if we receive SIGUSR1.

Nick Schermer noreply at xfce.org
Sat Nov 20 13:06:03 CET 2010


Updating branch refs/heads/master
         to da1215c3774b27186b13e48d13b276902a9086b4 (commit)
       from 922efd8cb1e6f75034bb2b1260ec7d6839dd4670 (commit)

commit da1215c3774b27186b13e48d13b276902a9086b4
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Nov 20 13:04:11 2010 +0100

    Restart the panel if we receive SIGUSR1.

 panel/main.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/panel/main.c b/panel/main.c
index dd2af21..2cd1a63 100644
--- a/panel/main.c
+++ b/panel/main.c
@@ -121,10 +121,11 @@ static void
 signal_handler_quit (gint signum)
 {
   panel_debug (PANEL_DEBUG_DOMAIN_MAIN,
-               "received signal %s <%d>, quiting panel",
-               g_strsignal (signum), signum);
+               "received signal %s <%d>, %s panel",
+               g_strsignal (signum), signum,
+               signum == SIGUSR1 ? "restarting" : "quiting");
 
-  panel_dbus_service_exit_panel (FALSE);
+  panel_dbus_service_exit_panel (signum == SIGUSR1);
 }
 
 
@@ -138,7 +139,7 @@ main (gint argc, gchar **argv)
   PanelDBusService *dbus_service;
   gboolean          succeed = FALSE;
   guint             i;
-  const gint        signums[] = { SIGINT, SIGQUIT, SIGTERM, SIGABRT };
+  const gint        signums[] = { SIGINT, SIGQUIT, SIGTERM, SIGABRT, SIGUSR1 };
   const gchar      *error_msg;
   XfceSMClient     *sm_client;
 



More information about the Xfce4-commits mailing list