From e8f522584917c86696037d7bb7c1c1a6df1ac343 Mon Sep 17 00:00:00 2001
From: Coguto <biti@wp.pl>
Date: Sun, 4 Apr 2021 00:06:33 +0200
Subject: [PATCH] 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
---
 lxc/execute | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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