summaryrefslogtreecommitdiff
path: root/src/core/scope.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-10-24 21:41:54 +0200
committerLennart Poettering <lennart@poettering.net>2016-11-02 11:29:59 -0600
commitf5869324e303a136d7ca802769e8966e8eb26d56 (patch)
treeb8a55d4cb7c3281ad53fd7672dbc9ab814c8e9df /src/core/scope.c
parentbbeea271172a4664ce9a4a41a7fa3b1ca18dbedd (diff)
core: rework the "no_gc" unit flag to become a more generic "perpetual" flag
So far "no_gc" was set on -.slice and init.scope, to units that are always running, cannot be stopped and never exist in an "inactive" state. Since these units are the only users of this flag, let's remodel it and rename it "perpetual" and let's derive more funcitonality off it. Specifically, refuse enqueing stop jobs for these units, and report that they are "unstoppable" in the CanStop bus property.
Diffstat (limited to 'src/core/scope.c')
-rw-r--r--src/core/scope.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/scope.c b/src/core/scope.c
index af0c43c7da..77f3fdc2aa 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -154,15 +154,13 @@ static int scope_load_init_scope(Unit *u) {
return 0;
u->transient = true;
- u->no_gc = true;
+ u->perpetual = true;
/* init.scope is a bit special, as it has to stick around forever. Because of its special semantics we
* synthesize it here, instead of relying on the unit file on disk. */
u->default_dependencies = false;
u->ignore_on_isolate = true;
- u->refuse_manual_start = true;
- u->refuse_manual_stop = true;
SCOPE(u)->kill_context.kill_signal = SIGRTMIN+14;
@@ -580,7 +578,7 @@ static void scope_enumerate(Manager *m) {
}
u->transient = true;
- u->no_gc = true;
+ u->perpetual = true;
SCOPE(u)->deserialized_state = SCOPE_RUNNING;
unit_add_to_load_queue(u);