exitcode_trap1.tests 150 B

123456
  1. # "exit" in trap should not use last command's exitcode,
  2. # but exitcode on entering the trap.
  3. (trap "echo Trapped; exit" EXIT
  4. (exit 1)
  5. )
  6. echo One:$?