From cd39a3461850ea4b75805236318645082a55e293 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Sat, 5 Jul 2025 19:52:31 +0000 Subject: [PATCH] [PATCH] Do not emit OOM notifications on systemd services reload When systemd services are reloaded, systemd emits all PropertiesChanged signals for all units. Comparing with the original signals these have a null MainPID, so we can use that to identify them and not emit a notification. BUG: 502279 (cherry picked from commit ce33b24d4f1b5711f7585b33822ab87f2f43af0b) ce33b24d Do not emit OOM notifications on systemd services reload Co-authored-by: Antonio Rojas Gbp-Pq: Name upstream_ec837446_Do-not-emit-OOM-notifications-on-systemd-services-reload.patch --- oom-notifier/module.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/oom-notifier/module.cpp b/oom-notifier/module.cpp index 64cf322b..127b8d22 100644 --- a/oom-notifier/module.cpp +++ b/oom-notifier/module.cpp @@ -57,6 +57,9 @@ public: if (changed.value(u"Result"_s, QString()) != "oom-kill"_L1) { return; } + if (changed.value(u"MainPID"_s) == 0) { + return; + } const auto unit = decodeUnitName(QFileInfo(msg.path()).fileName()); const auto service = serviceForUnitName(unit); -- 2.30.2