Fix several warnings that appear in gcc 4.3.2.
[wvstreams.git] / utils / complex-proc.sh
blob3c954d3924ca227d31c334abd2ad7ba7c5ce9e72
1 #!/bin/bash
2 # A program that generates some subprograms. For testing WvSubProc.
3 MAIN="$1-pid$$"
5 go()
7 SUB="$1"
9 trap "echo Exiting $SUB on TERM...; exit 0" SIGTERM
10 trap "echo Exiting $SUB on INT...; exit 0" SIGINT
12 for a in 1 2 3 4 5 6 7 8 9 10; do
13 echo " $SUB.$a"
14 sleep 1
15 done
17 echo "Done $SUB."
20 trap "echo Exiting $MAIN on TERM...; exit 0" SIGTERM
21 trap "echo Exiting $MAIN on INT...; exit 0" SIGINT
23 for d in 1 2 3 4 5 6 7 8 9 10; do
24 echo "Starting $MAIN.$d..."
25 go $MAIN.$d &
26 sleep 3
27 done
29 echo "Done $MAIN."