mirror of
https://github.com/sheumann/hush.git
synced 2024-11-09 02:09:01 +00:00
5c13270359
gets annoying pretty fast. Also fix wrong message there.
24 lines
403 B
Plaintext
Executable File
24 lines
403 B
Plaintext
Executable File
trap "echo got signal" USR1
|
|
|
|
for try in 1 2 3 4 5; do
|
|
kill -USR1 $$
|
|
sleep 0.2
|
|
echo "sent $try signal"
|
|
done &
|
|
|
|
sleep 2 &
|
|
|
|
sleeping=true
|
|
while $sleeping; do
|
|
trap
|
|
if wait %%; then
|
|
echo "sleep completed"
|
|
sleeping=false
|
|
elif [ $? == 127 ]; then
|
|
echo "BUG: no processes to wait for?!"
|
|
sleeping=false
|
|
else
|
|
echo "wait interrupted"
|
|
fi
|
|
done
|