summaryrefslogtreecommitdiffstats
path: root/src/portable
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-05-30 08:43:41 +0200
committerMike Yuan <me@yhndnzj.com>2024-05-30 15:51:48 +0200
commit12904d5387059dec6e148fc7f33fc0e3087009d4 (patch)
treee4ca298bf373d0a72523c6d798eaf93cac5fb5f3 /src/portable
parentcore/dbus-unit: modernize bus_unit_method_freezer_generic a bit (diff)
downloadsystemd-12904d5387059dec6e148fc7f33fc0e3087009d4.tar.xz
systemd-12904d5387059dec6e148fc7f33fc0e3087009d4.zip
bus-unit-util: rework UnitFreezer, explicitly thaw unit
Currently, we don't explicitly call unit_freezer_thaw(), but rely on the destructor to thaw the frozen unit on return. This has several problems though, one of them being that we ignore the return value of ThawUnit(), which is something we really shouldn't do here, since such failure can easily leave the whole system in unusable state. Moreover, the logging is kinda messy, e.g. homed might log "Everything completed" yet immediately followed by "Failed to thaw unit". Instead, we should log consistently and at higher level, to make things more debuggable. Therefore, let's step away from the practice. Plus, make UnitFreezer object heap-allocated, to match with existing unit_freezer_new() and allow us to use NULL to denote that the freezer is disabled.
Diffstat (limited to 'src/portable')
0 files changed, 0 insertions, 0 deletions