From 7b617155b50fdaad5d06359eb03e98f0c7b3087b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Sep 2013 19:26:47 +0200 Subject: [PATCH] core: failed scope units may not be restarted We don't allow reusing of scopes. --- TODO | 2 ++ src/core/scope.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/TODO b/TODO index 5fd9a59a7..519657fa8 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 20a969d91..b94f3ff7b 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; -- 2.30.2