Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > e520a3e525c7292a95b037466e21c9e6 > files > 6

gdm-3.14.2-5.1.mga5.src.rpm

From 095c3a9dee18ac5dbaa9bf677104858e0ecdaecc Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 4 Mar 2015 12:32:47 -0500
Subject: [PATCH] worker: kill session on SIGTERM

I guess in the past the session has implicitly gone away
when the display goes away, but now that the display is started
implicitly by the session that isn't really true anymore.

We need to explicitly kill the session when gdm is shutting down.

https://bugzilla.gnome.org/show_bug.cgi?id=745975
---
 daemon/gdm-session-worker.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index 4c69da2..ec41351 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -3348,6 +3348,11 @@ gdm_session_worker_finalize (GObject *object)
 
         gdm_session_worker_unwatch_child (worker);
 
+        if (worker->priv->child_pid > 0) {
+                gdm_signal_pid (worker->priv->child_pid, SIGTERM);
+                gdm_wait_on_pid (worker->priv->child_pid);
+        }
+
         g_object_unref (worker->priv->user_settings);
         g_free (worker->priv->service);
         g_free (worker->priv->x11_display_name);
-- 
2.3.1