[gdm] launch-environment: explicitly kill worker on stop even if session is running



commit 98e7f1e683b635dbaf2679583e040001c93d40ec
Author: Ray Strode <rstrode redhat com>
Date:   Wed May 14 09:29:18 2014 -0400

    launch-environment: explicitly kill worker on stop even if session is running
    
    Right now, if the launch environment is stopped while it's running the
    whole process group of the session is killed. The theory is that doing
    this will kill both the worker and the dbus-daemon (and anything else).
    
    The problem is, now that gdm-simple-slave is gone, the worker is not part
    of the same process group as its children, so killing the process group
    of the session leaves the worker alive.
    
    This commit makes sure the worker is always explicitly killed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729727

 daemon/gdm-launch-environment.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 195bf59..5d8c8ad 100644
--- a/daemon/gdm-launch-environment.c
+++ b/daemon/gdm-launch-environment.c
@@ -532,17 +532,17 @@ gdm_launch_environment_stop (GdmLaunchEnvironment *launch_environment)
 {
         if (launch_environment->priv->pid > 1) {
                 gdm_signal_pid (-launch_environment->priv->pid, SIGTERM);
-        } else {
-                if (launch_environment->priv->session != NULL) {
-                        gdm_session_stop_conversation (launch_environment->priv->session, 
"gdm-launch-environment");
-                        gdm_session_close (launch_environment->priv->session);
+        }
 
-                        g_clear_object (&launch_environment->priv->session);
-                }
+        if (launch_environment->priv->session != NULL) {
+                gdm_session_stop_conversation (launch_environment->priv->session, "gdm-launch-environment");
+                gdm_session_close (launch_environment->priv->session);
 
-                g_signal_emit (G_OBJECT (launch_environment), signals [STOPPED], 0);
+                g_clear_object (&launch_environment->priv->session);
         }
 
+        g_signal_emit (G_OBJECT (launch_environment), signals [STOPPED], 0);
+
         return TRUE;
 }
 


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