blob: 179bcdd8097a60058000c8157a4dbff7e29d598a [file] [log] [blame]
Denys Vlasenko27ff6812010-05-17 02:56:18 +02001trap "echo USR1 received" USR1
2stub() {
Denys Vlasenko08d8b3c2010-06-03 04:28:28 +02003 echo "Sleeping"
Denys Vlasenko27ff6812010-05-17 02:56:18 +02004 sleep $1
5 echo "$1 sec passed, sending USR1 to parent"
6 kill -USR1 $$
7}
Denys Vlasenko786cce12010-05-17 10:14:20 +02008stub 3 &
Denys Vlasenko27ff6812010-05-17 02:56:18 +02009stub 2 &
Denys Vlasenko786cce12010-05-17 10:14:20 +020010sleep 1
Denys Vlasenko27ff6812010-05-17 02:56:18 +020011until { echo "Waiting"; wait; } do
12 echo "Wait exit code: $?"
13done
14echo "Wait returned 0"