mirror of
https://github.com/systemd/systemd.git
synced 2026-08-05 07:30:30 +00: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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user