]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared: add generic logic for waiting for a unit to enter some state
authorLennart Poettering <lennart@poettering.net>
Mon, 1 Apr 2019 16:54:59 +0000 (18:54 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Jul 2019 10:18:51 +0000 (12:18 +0200)
commit3572d3df8f822d4cf1601428401a837f723771cf
tree0ee1dd4c8767f15aac59ba9f5795f3f65b89f300
parent345f3221856e41880923c88cf853361025999f8b
shared: add generic logic for waiting for a unit to enter some state

This is a generic implementation of a client-side logic of waiting until
a unit enters or leaves some state.

This is a more generic implementation of the WaitContext logic currently
in systemctl.c, and is supposed to replace it (a later commit does
this). It's similar to bus-wait-for-jobs.c and we probably should fold
that one into it later on.

This code is more powerful and cleaner than the WaitContext logic
however. In addition to waiting for a unit to exit this also allows us
to wait for a unit to leave the "maintainance" state.

This commit only implements the generic logic, and adds no users of it
yet.
src/shared/bus-wait-for-units.c [new file with mode: 0644]
src/shared/bus-wait-for-units.h [new file with mode: 0644]
src/shared/meson.build