scope: don't require an initialized PIDs set when deserializing

When a scope unit is created due to deserialization rather than client
request don't enforce that the PIDs set must be non-empty, since the
cgroup is already populated.
This commit is contained in:
Lennart Poettering 2013-07-10 20:35:57 +02:00
parent b170dd803d
commit 0c5778a26b

View file

@ -112,7 +112,7 @@ static int scope_verify(Scope *s) {
if (UNIT(s)->load_state != UNIT_LOADED)
return 0;
if (set_size(s->pids) <= 0) {
if (set_size(s->pids) <= 0 && UNIT(s)->manager->n_reloading <= 0) {
log_error_unit(UNIT(s)->id, "Scope %s has no PIDs. Refusing.", UNIT(s)->id);
return -EINVAL;
}