[gnome-session] Add diagnostic output for exit phase timeout



commit e97edcc49e77f38589155c3f65490cda5968e2bd
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 5 13:43:45 2009 -0400

    Add diagnostic output for exit phase timeout
    
    This helps finding out which clients cause gnome-session to
    hang for 10 seconds in the exit phase. See bug 597168.

 gnome-session/gsm-manager.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index ee90716..49fefe6 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -513,6 +513,15 @@ app_registered (GsmApp     *app,
 }
 
 static gboolean
+_client_failed_to_stop (const char *id,
+                        GsmClient  *client,
+                        gpointer    user_data)
+{
+        g_debug ("GsmManager: client failed to stop: %s, %s", gsm_client_peek_id (client), gsm_client_peek_app_id (client));
+        return FALSE;
+}
+
+static gboolean
 on_phase_timeout (GsmManager *manager)
 {
         GSList *a;
@@ -539,6 +548,9 @@ on_phase_timeout (GsmManager *manager)
         case GSM_MANAGER_PHASE_END_SESSION:
                 break;
         case GSM_MANAGER_PHASE_EXIT:
+                gsm_store_foreach (manager->priv->clients,
+                                   (GsmStoreFunc)_client_failed_to_stop,
+                                   NULL);
                 break;
         default:
                 g_assert_not_reached ();



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