From d48e2081c051a726cadd64e522f04d5e5a8d3261 Mon Sep 17 00:00:00 2001 From: peijiankang Date: Tue, 1 Aug 2023 20:17:07 +0800 Subject: [PATCH] ukui-settings-daemon-3.1.2-kylin-fix-coredump (cherry picked from commit 06c7d9dfa0762356cfe58a1e8bb11b53f8fa58ab) --- ...ings-daemon-3.1.2-kylin-fix-coredump.patch | 59 +++++++++++++++++++ ukui-settings-daemon.spec | 10 +++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch diff --git a/ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch b/ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch new file mode 100644 index 0000000..5a0ed6a --- /dev/null +++ b/ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch @@ -0,0 +1,59 @@ +diff -Naur ukui-settings-daemon-3.1.2/daemon/main.cpp ukui-settings-daemon-3.1.2~/daemon/main.cpp +--- ukui-settings-daemon-3.1.2/daemon/main.cpp 2022-04-15 11:36:50.000000000 +0800 ++++ ukui-settings-daemon-3.1.2~/daemon/main.cpp 2023-07-06 17:50:20.704690501 +0800 +@@ -31,7 +31,8 @@ + + #include + #include +- ++#include ++#include + static void print_help (); + static void parse_args (int argc, char *argv[]); + static void stop_daemon (); +@@ -46,6 +47,15 @@ + QApplication::exit(15); + } + ++void handlerA(int no) ++{ ++ USD_LOG(LOG_DEBUG,"catch SIGABRT signal, with exitcode %d",no); ++ ++ ++// manager->managerStop(); ++ QApplication::exit(15); ++} ++ + int main (int argc, char* argv[]) + { + #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) +@@ -63,6 +73,7 @@ + + + signal(SIGTERM, &handler); ++ signal(SIGABRT, &handlerA); + QApplication::setQuitOnLastWindowClosed(false); + + QTranslator translator; +@@ -88,6 +99,21 @@ + return 0; + } + ++ QObject::connect(&app,&QCoreApplication::aboutToQuit,[&]{ ++ ++ //PluginManager::getInstance()->managerStop(); ++ //managerStop()执行时间过长,导致注销时,所有插件未完全Daectivity就已经强行关闭系统,最终导致SIGSEGV、SIGABRT ++ ++ app.processEvents(); ++ //QTimer timer; ++ // Wait until the event loop starts ++ QTimer::singleShot(500, [=](){ ++ ++ exit(0); ++ }); ++ ++ }); ++ + USD_LOG(LOG_INFO, "ukui-settings-daemon started!"); + return app.exec(); + } diff --git a/ukui-settings-daemon.spec b/ukui-settings-daemon.spec index 871b67c..979a011 100644 --- a/ukui-settings-daemon.spec +++ b/ukui-settings-daemon.spec @@ -1,12 +1,13 @@ Name: ukui-settings-daemon Version: 3.1.2 -Release: 4 +Release: 5 Summary: daemon handling the UKUI session settings License: GPL-2.0-or-later and GPL-3.0-or-later and LGPL-2.0-or-later URL: http://www.ukui.org Source0: %{name}-%{version}.tar.gz Patch1: 0001-modify-compile-error-of-ukui-settings-daemon.patch Patch2: Fix-the-failure-of-shortcut-key-to-open-terminal.patch +Patch4: ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch BuildRequires: pkgconf-pkg-config BuildRequires: intltool @@ -88,6 +89,7 @@ Summary: daemon handling the UKUI session settings (common files) %setup -q %patch1 -p1 %patch2 -p1 +%patch4 -p1 %build %{qmake_qt5} @@ -133,6 +135,12 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null || : %changelog +* Mon Jul 10 2023 huayadong - 3.1.0-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add Patch4:ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch + * Sun Jun 25 2023 peijiankang - 3.1.2-4 - Type:bugfix - ID:NA