#
/bin/echo "termsim    Ver.: 1.0"
save_file=/tmp/termsim$RANDOM.$$

function autokill()
{
	echo " "
	echo Restoring TTY...
	stty `cat $save_file `
	/bin/rm -f $save_file
	echo Bye
	exit
}

echo "Use:   kill $$   to terminate this terminal emulation (wait 15 seconds)"
echo "This is tty: " `tty` 
echo " "
trap "autokill" SIGTERM
echo  Saving TTY configuration...
stty --save > $save_file
echo  Changing TTY configuration...
stty raw -echo

#wait forever
while (true) 
do
  nice sleep 15s
done
exit

