busybox/shell/ash_test/ash-misc/exitcode_trap5.tests

11 lines
175 B
Plaintext
Executable File

# "return" in trap sets $? after trap...
# ...but not a nested one!
g() { echo Nested; return 22; }
trap "echo TERM;false;g" term
f() {
(kill $$) &
sleep 1
}
f
echo Zero:$?