From: Lennart Poettering Date: Wed, 11 Sep 2013 17:26:47 +0000 (+0200) Subject: core: failed scope units may not be restarted X-Git-Tag: v207~21 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=7b617155b50fdaad5d06359eb03e98f0c7b3087b core: failed scope units may not be restarted We don't allow reusing of scopes. --- 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;