[gdm] server: clean up error handling
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] server: clean up error handling
- Date: Tue, 18 Sep 2012 17:59:32 +0000 (UTC)
commit 668f0ddc57ac0675cd39e3a04e645d99c20dcf15
Author: Ray Strode <rstrode redhat com>
Date: Tue Sep 18 11:33:50 2012 -0400
server: clean up error handling
Don't bother creating a child watch if we're about to fail anyway.
Don't exit from gdm-server.c, we do clean up from gdm-simple-slave.c
daemon/gdm-server.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/daemon/gdm-server.c b/daemon/gdm-server.c
index d271cba..d8b17a2 100644
--- a/daemon/gdm-server.c
+++ b/daemon/gdm-server.c
@@ -722,7 +722,7 @@ gdm_server_spawn (GdmServer *server,
g_warning (_("%s: Empty server command for display %s"),
"gdm_server_spawn",
server->priv->display_name);
- _exit (SERVER_ABORT);
+ goto out;
}
env = get_server_environment (server);
@@ -755,12 +755,15 @@ gdm_server_spawn (GdmServer *server,
g_ptr_array_foreach (env, (GFunc)g_free, NULL);
g_ptr_array_free (env, TRUE);
- g_debug ("GdmServer: Started X server process %d - waiting for READY", (int)server->priv->pid);
+ if (ret) {
+ g_debug ("GdmServer: Started X server process %d - waiting for READY", (int)server->priv->pid);
- server->priv->child_watch_id = g_child_watch_add (server->priv->pid,
- (GChildWatchFunc)server_child_watch,
- server);
+ server->priv->child_watch_id = g_child_watch_add (server->priv->pid,
+ (GChildWatchFunc)server_child_watch,
+ server);
+ }
+out:
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]