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