summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2010-11-20 13:04:11 +0100
committerNick Schermer <nick@xfce.org>2010-11-20 13:04:11 +0100
commitda1215c3774b27186b13e48d13b276902a9086b4 (patch)
treec0ab2e024b5830b39325ae7f3eed0dc7a855e8ce
parent922efd8cb1e6f75034bb2b1260ec7d6839dd4670 (diff)
Restart the panel if we receive SIGUSR1.
-rw-r--r--panel/main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/panel/main.c b/panel/main.c
index dd2af218..2cd1a63c 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;