[gdm] slave: fix infinite loop on shutdown



commit e19b881f9103940977c85229be4eac416d0fdc08
Author: Ray Strode <rstrode redhat com>
Date:   Mon Dec 16 16:57:19 2013 -0500

    slave: fix infinite loop on shutdown
    
    we stop something that calls stop in some circumstances.
    
    This commit breaks the loop.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712767

 daemon/gdm-simple-slave.c |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index 1fe58bc..d83216b 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -1668,8 +1668,23 @@ gdm_simple_slave_stop (GdmSlave *slave)
         GDM_SLAVE_CLASS (gdm_simple_slave_parent_class)->stop (slave);
 
         if (self->priv->greeter_environment != NULL) {
-                stop_greeter (self);
-                self->priv->greeter_environment = NULL;
+                g_signal_handlers_disconnect_by_func (G_OBJECT (self->priv->greeter_environment),
+                                                      G_CALLBACK (on_greeter_environment_session_opened),
+                                                      self);
+                g_signal_handlers_disconnect_by_func (G_OBJECT (self->priv->greeter_environment),
+                                                      G_CALLBACK (on_greeter_environment_session_started),
+                                                      self);
+                g_signal_handlers_disconnect_by_func (G_OBJECT (self->priv->greeter_environment),
+                                                      G_CALLBACK (on_greeter_environment_session_stopped),
+                                                      self);
+                g_signal_handlers_disconnect_by_func (G_OBJECT (self->priv->greeter_environment),
+                                                      G_CALLBACK (on_greeter_environment_session_exited),
+                                                      self);
+                g_signal_handlers_disconnect_by_func (G_OBJECT (self->priv->greeter_environment),
+                                                      G_CALLBACK (on_greeter_environment_session_died),
+                                                      self);
+                gdm_launch_environment_stop (GDM_LAUNCH_ENVIRONMENT (self->priv->greeter_environment));
+                g_clear_object (&self->priv->greeter_environment);
         }
 
         if (self->priv->start_session_id > 0) {


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