[gdm/fix-jump-back-to-login-screen: 7/21] local-display-factory: Don't try to respawn displays on shutdown
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/fix-jump-back-to-login-screen: 7/21] local-display-factory: Don't try to respawn displays on shutdown
- Date: Tue, 22 Mar 2022 14:41:13 +0000 (UTC)
commit f2bfc9373614de3875517ee19746020c307804b3
Author: Ray Strode <rstrode redhat com>
Date: Wed Sep 15 11:23:17 2021 -0400
local-display-factory: Don't try to respawn displays on shutdown
At the moment in the shutdown path we may try to respawn displays
that just got killed.
The respawning happens when things are half torn down leading to
crashes.
This commit makes sure we turn off the respawn logic in the shutdown
path.
daemon/gdm-local-display-factory.c | 11 ++++++++++-
daemon/gdm-manager.c | 2 ++
2 files changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 120847f95..c00e1c47d 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -73,6 +73,8 @@ struct _GdmLocalDisplayFactory
guint active_vt_watch_id;
guint wait_to_finish_timeout_id;
#endif
+
+ gboolean is_started;
};
enum {
@@ -505,6 +507,10 @@ on_display_status_changed (GdmDisplay *display,
gboolean is_initial = TRUE;
gboolean is_local = TRUE;
+
+ if (!factory->is_started)
+ return;
+
num = -1;
gdm_display_get_x11_display_number (display, &num, NULL);
@@ -1275,6 +1281,8 @@ gdm_local_display_factory_start (GdmDisplayFactory *base_factory)
g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE);
+ factory->is_started = TRUE;
+
store = gdm_display_factory_get_display_store (GDM_DISPLAY_FACTORY (factory));
g_signal_connect_object (G_OBJECT (store),
@@ -1311,9 +1319,10 @@ gdm_local_display_factory_stop (GdmDisplayFactory *base_factory)
g_signal_handlers_disconnect_by_func (G_OBJECT (store),
G_CALLBACK (on_display_removed),
factory);
-
g_clear_handle_id (&factory->seat0_graphics_check_timeout_id, g_source_remove);
+ factory->is_started = FALSE;
+
return TRUE;
}
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 4c2752fee..cc61efc93 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -2768,6 +2768,8 @@ gdm_manager_dispose (GObject *object)
g_return_if_fail (manager->priv != NULL);
+ gdm_manager_stop (manager);
+
g_clear_weak_pointer (&manager->priv->automatic_login_display);
#ifdef HAVE_LIBXDMCP
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]