source: MondoRescue/branches/2.2.9/mindi-busybox/shell/ash_test/ash-signals/signal1.tests@ 2725

Last change on this file since 2725 was 2725, checked in by Bruno Cornec, 13 years ago
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
  • Property svn:executable set to *
File size: 577 bytes
Line 
1trap "echo got signal" USR1
2
3for try in 1 2 3 4 5; do
4 kill -USR1 $$
5 sleep 0.2
6 echo "sent $try signal"
7done &
8
9# Ensure "wait" has something to wait for
10sleep 2 &
11
12# Ensure we do not execute "trap" below before "kill -USR1" above
13# (was getting failure on loaded machine without this)
14sleep 0.1
15
16sleeping=true
17while $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
28done
Note: See TracBrowser for help on using the repository browser.