From f0fdefc045b4c639e45c6731d3fa6d44e7468f06 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 25 Oct 2024 00:42:28 +0900 Subject: [PATCH] TEST-13-NSPAWN: trivially kill all processes in the container on termination Follow-up for 841988f80d2440501a3baddba712cdb955225ab7. No functional change, as $PID is 0 when the trap is inserted. --- test/units/TEST-13-NSPAWN.machined.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/units/TEST-13-NSPAWN.machined.sh b/test/units/TEST-13-NSPAWN.machined.sh index d014dfe1ba..b259a5bc16 100755 --- a/test/units/TEST-13-NSPAWN.machined.sh +++ b/test/units/TEST-13-NSPAWN.machined.sh @@ -39,10 +39,10 @@ cat >/var/lib/machines/long-running/sbin/init <<\EOF PID=0 -trap "touch /terminate; kill $PID" RTMIN+3 -trap "touch /poweroff" RTMIN+4 -trap "touch /reboot" INT -trap "touch /trap" TRAP +trap 'touch /terminate; kill 0' RTMIN+3 +trap 'touch /poweroff' RTMIN+4 +trap 'touch /reboot' INT +trap 'touch /trap' TRAP trap 'kill $PID' EXIT # We need to wait for the sleep process asynchronously in order to allow -- 2.25.1