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