summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authormsizanoen1 <msizanoen@qtmlabs.xyz>2023-05-02 16:59:07 +0700
committerYu Watanabe <watanabe.yu+github@gmail.com>2023-05-03 00:14:35 +0900
commit845824acddf2e7e08c94afe7cfee6e50a682c947 (patch)
tree4e12c1a3d07fa64daf56b442172a55d5de7d1cd2 /src/core
parent5789c60973ec2aafbe30685a5c38d40b12e23107 (diff)
downloadsystemd-845824acddf2e7e08c94afe7cfee6e50a682c947.tar.gz
core: check for SERVICE_RELOAD_NOTIFY in manager_dbus_is_running
This ensures that systemd won't erronously disconnect from the system bus in case a bus recheck is triggered immediately after the bus service emits `RELOADING=1`. This fixes an issue where systemd-logind sometimes randomly stops receiving `UnitRemoved` after a system update. This also handles SERVICE_RELOAD_SIGNAL just in case somebody ever creates a D-Bus broker implementation that uses `Type=notify-reload`.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 9e91aba632..9226cd2ab7 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1822,7 +1822,11 @@ static bool manager_dbus_is_running(Manager *m, bool deserialized) {
u = manager_get_unit(m, SPECIAL_DBUS_SERVICE);
if (!u)
return false;
- if (!IN_SET((deserialized ? SERVICE(u)->deserialized_state : SERVICE(u)->state), SERVICE_RUNNING, SERVICE_RELOAD))
+ if (!IN_SET((deserialized ? SERVICE(u)->deserialized_state : SERVICE(u)->state),
+ SERVICE_RUNNING,
+ SERVICE_RELOAD,
+ SERVICE_RELOAD_NOTIFY,
+ SERVICE_RELOAD_SIGNAL))
return false;
return true;