android_mt6572_jiabo/external/busybox/shell/ash_test/ash-signals/signal9.tests
2025-09-05 16:56:03 +08:00

21 lines
418 B
Text
Executable file

# Note: the inner script is a test which checks for a different bug
# (ordering between INT handler and exit on "set -e"),
# but so far I did not figure out how to simulate it non-interactively.
"$THIS_SH" -c '
exit_func() {
echo "Removing traps"
trap - EXIT TERM INT
echo "End of exit_func"
}
set -e
trap exit_func EXIT TERM INT
sleep 2
exit 77
' &
child=$!
sleep 1
kill -TERM $child
wait
echo Done: $?