philippe | 6654de8 | 2014-04-15 22:35:23 +0000 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | |
| 3 | # send_signal sends signal $1 to the Valgrind process using prefix $2 in $3 seconds |
| 4 | SIG=$1 |
| 5 | shift |
| 6 | PREFIX=$1 |
| 7 | shift |
| 8 | SLEEP=$1 |
| 9 | shift |
| 10 | VPID=`./vgdb -l $PREFIX 2>&1 | awk '{print $2}' | sed -e 's/--pid=//'` |
| 11 | if [ "$VPID" = "" ] |
| 12 | then |
| 13 | echo "send_signal could not determine the valgrind pid with " $PREFIX |
| 14 | exit 1 |
| 15 | fi |
| 16 | (sleep $SLEEP |
philippe | 90afa78 | 2014-04-26 19:55:33 +0000 | [diff] [blame^] | 17 | echo sending signal |
philippe | 6654de8 | 2014-04-15 22:35:23 +0000 | [diff] [blame] | 18 | kill -s $SIG $VPID) & |