1 2 3 4 5
set -T trapped='' trap "trapped=x$trapped" TERM [ "x$(:; kill $$)y" = xy ] && [ "$trapped" = x ]