1 2 3
# Bug happens only if there is no space in "}&" { trap "echo got TERM" TERM; sleep 3; }& sleep 1; kill $!; wait echo Done: $?