1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-26 08:55:40 +03:00

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

Follow-up for 841988f80d.

No functional change, as "kill $PID" in the trap is equivalent to 'kill 0'.
Let's make the code trivial.
This commit is contained in:
Yu Watanabe 2024-10-25 00:42:28 +09:00
parent f956b7c936
commit 3d9ad7097e

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