Denys Vlasenko | 27ff681 | 2010-05-17 02:56:18 +0200 | [diff] [blame] | 1 | trap "echo USR1 received" USR1 |
| 2 | stub() { |
Denys Vlasenko | 08d8b3c | 2010-06-03 04:28:28 +0200 | [diff] [blame] | 3 | echo "Sleeping" |
Denys Vlasenko | 27ff681 | 2010-05-17 02:56:18 +0200 | [diff] [blame] | 4 | sleep $1 |
| 5 | echo "$1 sec passed, sending USR1 to parent" |
| 6 | kill -USR1 $$ |
| 7 | } |
Denys Vlasenko | 786cce1 | 2010-05-17 10:14:20 +0200 | [diff] [blame] | 8 | stub 3 & |
Denys Vlasenko | 27ff681 | 2010-05-17 02:56:18 +0200 | [diff] [blame] | 9 | stub 2 & |
Denys Vlasenko | 786cce1 | 2010-05-17 10:14:20 +0200 | [diff] [blame] | 10 | sleep 1 |
Denys Vlasenko | 27ff681 | 2010-05-17 02:56:18 +0200 | [diff] [blame] | 11 | until { echo "Waiting"; wait; } do |
| 12 | echo "Wait exit code: $?" |
| 13 | done |
| 14 | echo "Wait returned 0" |