1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-11 09:18:07 +03:00

TEST-13-NSPAWN: trivially kill all processes in the container on termination

Follow-up for 841988f80d.

No functional change, as $PID is 0 when the trap is inserted.
This commit is contained in:
Yu Watanabe 2024-10-25 00:42:28 +09:00
parent 1856ab4503
commit f0fdefc045

View File

@ -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