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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user