summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-misc/exitcode_trap3.tests
blob: 98745e463d2a027dd38636ad7e1f09c4ce11d24b (plain)
1
2
3
4
5
6
7
8
9
# "return" in trap should not use last command's exitcode,
# but exitcode on entering the trap.
trap "echo TERM;return" term
f() {
	(sleep 1; kill $$) &
	until (exit 42) do (exit 42); done
}
f
echo 42:$?