summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-09-11 19:26:47 +0200
committerLennart Poettering <lennart@poettering.net>2013-09-11 19:28:28 +0200
commit7b617155b50fdaad5d06359eb03e98f0c7b3087b (patch)
tree75fc8974a9a65248f36a818907f3ba84ab74e924
parent44ded3abc28620279633f51a05f2416e5aa3e8e2 (diff)
core: failed scope units may not be restarted
We don't allow reusing of scopes.
-rw-r--r--TODO2
-rw-r--r--src/core/scope.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/TODO b/TODO
index 5fd9a59a7d..519657fa81 100644
--- a/TODO
+++ b/TODO
@@ -58,6 +58,8 @@ CGroup Rework Completion:
Features:
+* ensure scope units may be started only a single time
+
* document that in instead of FsckPassNo= people should just add a manual dep to systemd-fsck@.service to their mount units.
* better error message if you run systemctl without systemd running
diff --git a/src/core/scope.c b/src/core/scope.c
index 20a969d913..b94f3ff7ba 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -239,6 +239,9 @@ static int scope_start(Unit *u) {
assert(s);
+ if (s->state == SCOPE_FAILED)
+ return -EPERM;
+
if (s->state == SCOPE_STOP_SIGTERM ||
s->state == SCOPE_STOP_SIGKILL)
return -EAGAIN;