1 #! /bin/sh 2 3 ############################################################################### 4 # # 5 # Copyright (c) 2010 FUJITSU LIMITED # 6 # # 7 # This program is free software; you can redistribute it and/or modify it # 8 # under the terms of the GNU General Public License as published by the Free # 9 # Software Foundation; either version 2 of the License, or (at your option) # 10 # any later version. # 11 # # 12 # Author: Li Zefan <lizf (at] cn.fujitsu.com> # 13 # # 14 ############################################################################### 15 16 kill_this_pid() 17 { 18 kill -KILL $this_pid 19 wait $this_pid 20 exit 0 21 } 22 23 trap kill_this_pid SIGUSR1 24 25 LOOP=20 26 27 while true; do 28 i=0 29 while [ $i -lt $LOOP ]; do 30 cat "$TRACING_PATH"/trace_pipe > /dev/null & 31 this_pid=$! 32 33 tst_sleep 200000us 34 35 kill -INT $this_pid 36 wait $this_pid 37 38 this_pid=0 39 40 tst_sleep 200000us 41 42 i=$((i + 1)) 43 done 44 sleep 2 45 done 46