1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00

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;
}