data/method/busybox/busybox-1.36.0/shell/ash_test/ash-misc/exitcode_trap1.tests

7 lines
150 B
Plaintext
Raw Normal View History

2024-01-29 10:44:43 +08:00
# "exit" in trap should not use last command's exitcode,
# but exitcode on entering the trap.
(trap "echo Trapped; exit" EXIT
(exit 1)
)
echo One:$?