Kill the running program

Dear All,

I have a script which after executing is not stoping when i press ctrl+c.
Now i want to Append the script in such a way when i press ctrl+c while execution of the program it should take it as arguements and should kill the script/running program forcefully.

I know the command to kill the the program Forcefully (kill -9 `ps -a | grep "ping_script" | awk '{print $1}'` )

Please help me to get out of this problem.
Advance Thanks,
Akhtar Bhat.

Here is an example to trap INT signal ( Ctrl - C )

signal()
{
  echo "-- signal() --"
  echo "sleeping"
  sleep 1
  exit
}

trap signal INT

while :
do
  echo "here"
  sleep 1
done