From 9ee2ea141adc7765f6c212e63839ef23a4494b30 Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Tue, 9 Mar 2021 10:43:59 -0800
Subject: [PATCH 11/52] Use qWarning and _exit() instead of qFatal for wayland
error
This type of error is likely to happen upon system logout. qFatal would
trigger sigabrt and leave unnecessary coredump on the system. Using
qWarning here would make it consistent with xcb's io error.
Pick-to: 5.15 6.0 6.1
Change-Id: I571ba007bf2453486b81837cccdbefa5f181b63d
Reviewed-by: David Edmundson <davidedmundson@kde.org>
---
src/client/qwaylanddisplay.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index fe094f6f..f10c1f79 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -206,10 +206,11 @@ void QWaylandDisplay::checkError() const
int ecode = wl_display_get_error(mDisplay);
if ((ecode == EPIPE || ecode == ECONNRESET)) {
// special case this to provide a nicer error
- qFatal("The Wayland connection broke. Did the Wayland compositor die?");
+ qWarning("The Wayland connection broke. Did the Wayland compositor die?");
} else {
- qFatal("The Wayland connection experienced a fatal error: %s", strerror(ecode));
+ qWarning("The Wayland connection experienced a fatal error: %s", strerror(ecode));
}
+ _exit(1);
}
void QWaylandDisplay::flushRequests()
--
2.35.1