android_mt6572_jiabo/external/busybox/shell/hush_test/hush-trap/catch.tests
2025-09-05 16:56:03 +08:00

20 lines
286 B
Text
Executable file

# avoid ugly warnings about signals not being caught
trap ":" USR1 USR2
"$THIS_SH" -c '
trap "echo caught" USR2
echo "sending USR2"
kill -USR2 $$
trap "" USR2
echo "sending USR2"
kill -USR2 $$
trap "-" USR2
echo "sending USR2"
kill -USR2 $$
echo "not reached"
'
trap "-" USR1 USR2