busybox/shell/ash_test/ash-signals/catch.tests
Denys Vlasenko 8d2191c6ae ash: copy three tests from hush_test/hush-signals/*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-24 19:42:46 +02:00

21 lines
286 B
Plaintext
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