[gdm/wip/wayland: 7/10] daemon: kill the slave before starting the user session
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/wayland: 7/10] daemon: kill the slave before starting the user session
- Date: Wed, 18 Sep 2013 05:10:41 +0000 (UTC)
commit df9e6660b63f09a6af70d46bae89079f2003846c
Author: Ray Strode <rstrode redhat com>
Date: Tue Sep 17 23:37:18 2013 -0400
daemon: kill the slave before starting the user session
we don't need it anymore during the user session, so kill
it early.
daemon/gdm-display.c | 23 +++++++++++++++++++++--
1 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index f98e9ec..b397e5f 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -103,6 +103,12 @@ enum {
static void gdm_display_class_init (GdmDisplayClass *klass);
static void gdm_display_init (GdmDisplay *display);
static void gdm_display_finalize (GObject *object);
+static void slave_exited (GdmSlaveJob *job,
+ int code,
+ GdmDisplay *display);
+static void slave_died (GdmSlaveJob *job,
+ int signum,
+ GdmDisplay *display);
static void queue_finish (GdmDisplay *display);
static void _gdm_display_set_status (GdmDisplay *display,
int status);
@@ -623,7 +629,6 @@ slave_died (GdmSlaveJob *job,
queue_finish (display);
}
-
static void
_gdm_display_set_status (GdmDisplay *display,
int status)
@@ -1695,13 +1700,27 @@ on_slave_initial_session_stopped (GdmDBusSlave *slave,
GTask *task)
{
GError *error = NULL;
+ GdmDisplay *display;
if (!gdm_dbus_slave_call_stop_initial_session_finish (slave, result, &error)) {
g_task_return_error (task, error);
return;
}
- g_debug ("GdmDisplay: slave set up for user session to start");
+ display = g_task_get_source_object (task);
+ g_signal_handlers_disconnect_by_func (display->priv->slave_job,
+ G_CALLBACK (slave_exited),
+ display);
+ g_signal_handlers_disconnect_by_func (display->priv->slave_job,
+ G_CALLBACK (slave_died),
+ display);
+ if (display->priv->slave_name_id > 0) {
+ g_bus_unwatch_name (display->priv->slave_name_id);
+ }
+ gdm_slave_job_stop (display->priv->slave_job);
+ g_clear_object (&display->priv->slave_job);
+
+ g_debug ("GdmDisplay: slave's job complete, ready for user session");
g_task_return_boolean (task, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]