scope: refuse activation of scopes if no PIDs to add are left
authorLennart Poettering <lennart@poettering.net>
Wed, 27 Oct 2021 21:17:50 +0000 (23:17 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 13 Jan 2022 09:48:57 +0000 (10:48 +0100)
commitdd69dae5a97f8ed0dd8259f2c472630392b24f5a
tree74e27fc496d6522b0c62e53316cf5a837c9ac90d
parent3b13ae847a774fbfcbfca6bc27e8b854e5a0c332
scope: refuse activation of scopes if no PIDs to add are left

If all processes we are supposed to add are gone by the time we are
ready to do so, let's fail.

THis is heavily based on Cunlong Li's work, who thankfully tracked this
down.

Replaces: #20577
(cherry picked from commit 8d3e4ac7cd37200d1431411a4b98925a24b7d9b3)
(cherry picked from commit 7ecb1b82d9b55a081d81b2802695fd21293ce029)
src/core/cgroup.c
src/core/scope.c