exitcode_trap4.tests 149 B

12345678
  1. # "return" in trap sets $? after trap
  2. trap "echo TERM;return 11" term
  3. f() {
  4. (sleep 1; kill $$) &
  5. until (exit 42) do (exit 42); done
  6. }
  7. f
  8. echo 11:$?