#!/bin/csh -f

set iter=0
while (1)
	set iter=`expr $iter + 1`
	echo "Iteration: $iter"

	./linux 0 << xxherexx
0
xxherexx
        sleep 1 
	if ( ! -f core ) then
		ls -l core
		echo "Missing core after $iter iterations"
		break
	endif

        rm -f core
end

