Janitor now uses real user IDs instead of effective user IDs

If runner spawns processes with a different effective UID (e.g. passwd), janitor needs to kill those too
This commit is contained in:
Coguto 2021-04-04 00:06:33 +02:00 committed by GitHub
parent 16c585d41d
commit e8f5225849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,9 +40,9 @@ timeout -s KILL 20 \
# process janitor # process janitor
lxc-attach --clear-env -n piston -- \ lxc-attach --clear-env -n piston -- \
/bin/bash -c " /bin/bash -c "
while pgrep -u runner$runner > /dev/null while pgrep -U runner$runner > /dev/null
do do
pkill -u runner$runner --signal SIGKILL pkill -U runner$runner --signal SIGKILL
done done
find /tmp -user runner$runner -delete find /tmp -user runner$runner -delete