[systemd-devel] Wait for restarted unit to be ready

Jonathan Gold jonathan.e.gold at gmail.com
Fri May 4 20:47:15 UTC 2018


I'm working on some code that handles restarting systemd units via dbus,
and I want to make sure that my logic is correct.

My goal is to restart a unit, and wait for it to be active before my
function returns. Once I've asked the unit to restart, I am watching the
`JobRemoved` signal for messages containing the unit name and handling the
result accordingly. If the signal result is "done" my function returns, and
otherwise it errors. Is this the correct way to wait for unit readiness?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180504/071a07d0/attachment.html>


More information about the systemd-devel mailing list