[gnome-session] fail-whale: handle X server dying before startup
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] fail-whale: handle X server dying before startup
- Date: Tue, 20 Jun 2017 18:05:32 +0000 (UTC)
commit 15e00232ae29f29a5e9636ccbe0a5794b6c5b4a8
Author: Ray Strode <rstrode redhat com>
Date: Tue May 30 12:46:19 2017 -0400
fail-whale: handle X server dying before startup
This commit deals with gtk_init_with_args failing,
without setting an error (which it does if it can't
connect to the X server).
https://bugzilla.gnome.org/show_bug.cgi?id=775463
gnome-session/gsm-fail-whale-dialog.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/gnome-session/gsm-fail-whale-dialog.c b/gnome-session/gsm-fail-whale-dialog.c
index f53ce41..c5889ef 100644
--- a/gnome-session/gsm-fail-whale-dialog.c
+++ b/gnome-session/gsm-fail-whale-dialog.c
@@ -371,13 +371,20 @@ int main (int argc, char *argv[])
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- gtk_init_with_args (&argc, &argv, " - fail whale",
- entries, GETTEXT_PACKAGE,
- &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- exit (1);
- }
+ if (!gtk_init_with_args (&argc, &argv, " - fail whale",
+ entries, GETTEXT_PACKAGE,
+ &error)) {
+ if (error != NULL) {
+ g_warning ("%s", error->message);
+ exit (1);
+ }
+
+ /* display server probably went away. Could be for legitimate reasons, could be for
+ * unexpected reasons. If it went away unexpectantly, that's logged elsewhere, so
+ * let's not add noise by logging here.
+ */
+ return 0;
+ }
fail_dialog = g_object_new (GSM_TYPE_FAIL_WHALE_DIALOG, NULL);
fail_dialog->priv->debug_mode = debug_mode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]