[comp.sys.att] Shell recursion

grt@twitch.UUCP ( G.R.Tomasevich) (10/21/87)

Someone asked about escaping from
foo () { foo ; }
Someone else gets "ksh: foo: recursive call"
I tried it and got the same result.  Then I tried

	foo () { echo $1; foo `inc $1` ; }
where 'inc' is essentially
	main(n,a) int n; char **a; { printf("%d\n",atoi(a[1])+); }
It is up to 216 and counting.  A number comes out every 2-3 seconds.
Why is this so high?  I see no real difference from the case which uses
no arguments.
-- 
	George Tomasevich, ihnp4!twitch!grt
	AT&T Bell Laboratories, Holmdel, NJ