shell/ash_test/ash-misc/exitcode_trap2.right+1 -0
shell/ash_test/ash-misc/exitcode_trap2.tests+9 -0
| @@ -0,0 +1,9 @@ |
| + | # "exit" in trap should not use last command's exitcode, |
| + | # but exitcode on entering the trap. |
| + | $THIS_SH -c ' |
| + | trap "false;exit" term |
| + | kill $$ & |
| + | (exit 42) |
| + | wait |
| + | ' |
| + | echo 42:$? |
shell/hush_test/hush-misc/exitcode_trap2.right+1 -0
shell/hush_test/hush-misc/exitcode_trap2.tests+9 -0
| @@ -0,0 +1,9 @@ |
| + | # "exit" in trap should not use last command's exitcode, |
| + | # but exitcode on entering the trap. |
| + | $THIS_SH -c ' |
| + | trap "false;exit" term |
| + | kill $$ & |
| + | (exit 42) |
| + | wait |
| + | ' |
| + | echo 42:$? |