exitcode_trap5.tests 175 B

12345678910
  1. # "return" in trap sets $? after trap...
  2. # ...but not a nested one!
  3. g() { echo Nested; return 22; }
  4. trap "echo TERM;false;g" term
  5. f() {
  6. (kill $$) &
  7. sleep 1
  8. }
  9. f
  10. echo Zero:$?