#!/bin/sh

PIDFILE=/usr/local/cgdb/pid
LOCKFILE=/usr/local/cgdb/cego.lock
TIMEOUT=20

kill -INT `cat $PIDFILE`

count=$TIMEOUT
while test -e ${LOCKFILE} && test ${count} -ge 0 
do
   sleep 1
   count=`expr $count -  1`
done
exit 0

