ash: add a testcase for recently fixed signal bug

This commit is contained in:
Denis Vlasenko
2008-02-13 18:09:56 +00:00
parent 23ffb6a4a2
commit 81887e2342
4 changed files with 49 additions and 7 deletions

View File

@@ -0,0 +1,24 @@
sleeping=true
trap "echo got signal" USR1
for try in 1 2 3 4 5; do
kill -USR1 $$
sleep 1
echo sent $try signal
done &
sleep 10 &
while $sleeping; do
trap
if wait %%; then
echo sleep completed
sleeping=false
elif [ $? == 127 ]; then
echo no sleep tonite
sleeping=false
else
echo sleep interrupted;
fi
done