1 2 3
# Bug: TERM does not trigger in the child { trap "echo got TERM" TERM; sleep 3; }& sleep 1; kill $!; wait echo Done: $?