]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl-start-unit: Subscribe() is unnecessary if we RefUnit explicitly
authorMike Yuan <me@yhndnzj.com>
Tue, 16 Apr 2024 17:32:27 +0000 (01:32 +0800)
committerMike Yuan <me@yhndnzj.com>
Fri, 19 Apr 2024 02:08:36 +0000 (10:08 +0800)
commitad6b84d9601f6009fb7deeaa82e0c0901e511b1e
tree14dec6bbbd5c69118f3503338b04b0db68f66a23
parent848cdaa6dd1335912dbab1d2acf6663bb168d3b0
systemctl-start-unit: Subscribe() is unnecessary if we RefUnit explicitly

Subscribe() enables full signal delivery on API bus. But aside from
that, if a unit/job is explicitly Ref()'d, manager also emits the
signal. See bus_foreach_bus() for details.

bus-wait-for-units refs every unit to wait for, so there's no need
to Subscribe() on top of that. In verb_clean_or_freeze() Subscribe()
is not called either.
src/systemctl/systemctl-start-unit.c