[gdm/gnome-2-30] Don't exit when local display fails to start
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/gnome-2-30] Don't exit when local display fails to start
- Date: Wed, 16 Jun 2010 21:18:44 +0000 (UTC)
commit 709e80d3e9ef409fa63aa892e68d73ab9685fd19
Author: William Jon McCann <jmccann redhat com>
Date: Wed Jun 16 16:32:20 2010 -0400
Don't exit when local display fails to start
It doesn't really make a lot of sense to exit when the
local display can't be started. Exiting won't leave the system
in any better shape that it would be with gdm running in the
background. On the other hand it makes it so that XDMCP and other
services can't run headless. Ideally we'd have some kind of
smart detection of when local hardware is available and when it
changes. And smarter fallback code for when the hardware is
available but the display can't be started due to some error.
https://bugzilla.gnome.org/show_bug.cgi?id=342397
daemon/gdm-local-display-factory.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c
index 8dc1e9d..73ab499 100644
--- a/daemon/gdm-local-display-factory.c
+++ b/daemon/gdm-local-display-factory.c
@@ -311,10 +311,11 @@ on_static_display_status_changed (GdmDisplay *display,
if (factory->priv->num_failures > MAX_DISPLAY_FAILURES) {
/* oh shit */
g_warning ("GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors");
- exit (1);
+ /* FIXME: should monitor hardware changes to
+ try again when seats change */
+ } else {
+ create_display (factory);
}
-
- create_display (factory);
break;
case GDM_DISPLAY_UNMANAGED:
break;
@@ -371,13 +372,17 @@ gdm_local_display_factory_start (GdmDisplayFactory *base_factory)
{
gboolean ret;
GdmLocalDisplayFactory *factory = GDM_LOCAL_DISPLAY_FACTORY (base_factory);
+ GdmDisplay *display;
g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE);
ret = TRUE;
/* FIXME: use seat configuration */
- create_display (factory);
+ display = create_display (factory);
+ if (display == NULL) {
+ ret = FALSE;
+ }
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]