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