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 <arojas@archlinux.org>
Gbp-Pq: Name upstream_ec837446_Do-not-emit-OOM-notifications-on-systemd-services-reload.patch
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);