Magellan Linux

Contents of /trunk/mkinitrd-magellan/busybox/shell/ash_test/ash-signals/signal1.tests

Parent Directory Parent Directory | Revision Log Revision Log


Revision 984 - (show annotations) (download)
Sun May 30 11:32:42 2010 UTC (13 years, 11 months ago) by niro
File size: 577 byte(s)
-updated to busybox-1.16.1 and enabled blkid/uuid support in default config
1 trap "echo got signal" USR1
2
3 for try in 1 2 3 4 5; do
4 kill -USR1 $$
5 sleep 0.2
6 echo "sent $try signal"
7 done &
8
9 # Ensure "wait" has something to wait for
10 sleep 2 &
11
12 # Ensure we do not execute "trap" below before "kill -USR1" above
13 # (was getting failure on loaded machine without this)
14 sleep 0.1
15
16 sleeping=true
17 while $sleeping; do
18 trap
19 if wait %%; then
20 echo "sleep completed"
21 sleeping=false
22 elif [ $? == 127 ]; then
23 echo "BUG: no processes to wait for?!"
24 sleeping=false
25 else
26 echo "wait interrupted"
27 fi
28 done