killall: gracefully handle processes inserted into containers via nsenter -a
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Nov 2024 11:02:46 +0000 (12:02 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 20 Nov 2024 18:11:38 +0000 (18:11 +0000)
commitf6793bbcf0e3f0a6daa77add96183b88d5ec2117
tree27d962cbc7eeb05011da11681a2fc350ad78348e
parentf87863a8ffe4c08a6face2e43a62d7852978642a
killall: gracefully handle processes inserted into containers via nsenter -a

"nsenter -a" doesn't migrate the specified process into the target
cgroup (it really should). Thus the cgroup will remain in a cgroup
that is (due to cgroup ns) outside our visibility. The kernel will
report the cgroup path of such cgroups as starting with "/../". Detect
that and print a reasonably error message instead of trying to resolve
that.
src/basic/cgroup-util.c
src/shared/killall.c