summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2014-05-14 09:29:18 -0400
committerRay Strode <rstrode@redhat.com>2014-05-14 09:32:56 -0400
commit98e7f1e683b635dbaf2679583e040001c93d40ec (patch)
treeb7a4129f19d574fef6fb21e704d682e7410cb9ee
parent1282e09a595b73ae530ccb4ed9f942947d1f3fba (diff)
downloadgdm-98e7f1e683b635dbaf2679583e040001c93d40ec.tar.gz
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
-rw-r--r--daemon/gdm-launch-environment.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index 195bf592..5d8c8ada 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;
}