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:
parent
1856ab4503
commit
f0fdefc045
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user