[Xfce4-commits] <xfce4-session:master> Add some additional checks for bug #5233.
Nick Schermer
noreply at xfce.org
Sun Feb 7 14:44:01 CET 2010
Updating branch refs/heads/master
to 03bb380686deb6d382e80d000df8c7dc321f90c3 (commit)
from 9716629ca0e889c2ffaad60eb96b75bac8a5bb2c (commit)
commit 03bb380686deb6d382e80d000df8c7dc321f90c3
Author: Nick Schermer <nick at xfce.org>
Date: Sun Feb 7 14:23:20 2010 +0100
Add some additional checks for bug #5233.
xfce4-session/xfsm-manager.c | 29 ++++++++++++++++++-----------
1 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c
index f34b5de..52c60ea 100644
--- a/xfce4-session/xfsm-manager.c
+++ b/xfce4-session/xfsm-manager.c
@@ -348,6 +348,7 @@ xfsm_manager_handle_failed_properties (XfsmManager *manager,
XfsmProperties *properties)
{
gint restart_style_hint;
+ GError *error = NULL;
/* Handle apps that failed to start, or died randomly, here */
@@ -407,7 +408,7 @@ xfsm_manager_handle_failed_properties (XfsmManager *manager,
properties->client_id);
discard_command = xfsm_properties_get_strv (properties, SmDiscardCommand);
- if (discard_command != NULL)
+ if (discard_command != NULL && g_strv_length (discard_command) > 0)
{
/* Run the SmDiscardCommand after the client exited in any state,
* but only if we don't expect the client to be restarted,
@@ -426,16 +427,22 @@ xfsm_manager_handle_failed_properties (XfsmManager *manager,
* ever-growing number of xfwm4 session files when restarting
* xfwm4 within a session.
*/
- xfsm_verbose ("Client Id = %s: running discard command.\n\n",
- properties->client_id);
-
- g_spawn_sync (xfsm_properties_get_string (properties, SmCurrentDirectory),
- discard_command,
- xfsm_properties_get_strv (properties, SmEnvironment),
- G_SPAWN_SEARCH_PATH,
- NULL, NULL,
- NULL, NULL,
- NULL, NULL);
+ xfsm_verbose ("Client Id = %s: running discard command %s:%d.\n\n",
+ properties->client_id, *discard_command,
+ g_strv_length (discard_command));
+
+ if (!g_spawn_sync (xfsm_properties_get_string (properties, SmCurrentDirectory),
+ discard_command,
+ xfsm_properties_get_strv (properties, SmEnvironment),
+ G_SPAWN_SEARCH_PATH,
+ NULL, NULL,
+ NULL, NULL,
+ NULL, &error))
+ {
+ g_warning ("Failed to running discard command \"%s\": %s",
+ *discard_command, error->message);
+ g_error_free (error);
+ }
}
return FALSE;
More information about the Xfce4-commits
mailing list