blob: 98745e463d2a027dd38636ad7e1f09c4ce11d24b [file] [log] [blame]
Denys Vlasenkobb095f42020-02-20 16:37:59 +01001# "return" in trap should not use last command's exitcode,
2# but exitcode on entering the trap.
3trap "echo TERM;return" term
4f() {
5 (sleep 1; kill $$) &
6 until (exit 42) do (exit 42); done
7}
8f
9echo 42:$?