chiark / gitweb /
core: failed scope units may not be restarted
authorLennart Poettering <lennart@poettering.net>
Wed, 11 Sep 2013 17:26:47 +0000 (19:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 11 Sep 2013 17:28:28 +0000 (19:28 +0200)
We don't allow reusing of scopes.

TODO
src/core/scope.c

diff --git a/TODO b/TODO
index 5fd9a59..519657f 100644 (file)
--- 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
index 20a969d..b94f3ff 100644 (file)
@@ -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;