diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-04-14 15:24:08 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-05-25 16:03:03 +0200 |
commit | 0bc488c99ab2ed3464237607e381f4d72cd321d5 (patch) | |
tree | 5dfbbe4572ec4a3d945b3b4b50369e78a3c62a64 /src/core/manager.h | |
parent | 294446dcb98eaa1ced5839da674c2065b1367a3a (diff) | |
download | systemd-0bc488c99ab2ed3464237607e381f4d72cd321d5.tar.gz |
core: implement Uphold= dependency type
This is like a really strong version of Wants=, that keeps starting the
specified unit if it is ever found inactive.
This is an alternative to Restart= inside a unit, acknowledging the fact
that whether to keep restarting the unit is sometimes not a property of
the unit itself but the state of the system.
This implements a part of what #4263 requests. i.e. there's no
distinction between "always" and "opportunistic". We just dumbly
implement "always" and become active whenever we see no job queued for
an inactive unit that is supposed to be upheld.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r-- | src/core/manager.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/manager.h b/src/core/manager.h index f58982a364..bfb8b628e7 100644 --- a/src/core/manager.h +++ b/src/core/manager.h @@ -187,6 +187,9 @@ struct Manager { /* Units that might be subject to StopWhenUnneeded= clean-up */ LIST_HEAD(Unit, stop_when_unneeded_queue); + /* Units which are upheld by another other which we might need to act on */ + LIST_HEAD(Unit, start_when_upheld_queue); + sd_event *event; /* This maps PIDs we care about to units that are interested in. We allow multiple units to he interested in |