Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!ptsfa!ihnp4!occrsh!occrsh.ATT.COM!tiger.UUCP!rjd From: rjd@tiger.UUCP Newsgroups: comp.sys.att Subject: Re: infinite regress Message-ID: <144800004@tiger.UUCP> Date: Fri, 16-Oct-87 23:32:00 EDT Article-I.D.: tiger.144800004 Posted: Fri Oct 16 23:32:00 1987 Date-Received: Sun, 18-Oct-87 23:44:40 EDT References: <3269@sol.ARPA> Lines: 20 Nf-ID: #R:sol.ARPA:-326900:tiger.UUCP:144800004:000:810 Nf-From: tiger.UUCP!rjd Oct 16 22:32:00 1987 > How can one escape from an infinitely recursive ksh function, such as > foo () { foo ; } > > My experience (blush) is that shift-esc and ctrl-shift-pipe work fine, > in that the process hesitates, and in the second case core is dumped, > but like Jason, or that guy in Halloween, the thing just keeps coming > back, executing forever. > > 1. if one is in unix thru ua, then (I presume) one could get to another > window, su root and kill the runaway shell script. > > 2. but what if one isn't in ua? I guess I am missing something, because every Unix system I know of limits a user to a number of process (such as 20). After the 20th iteration of this recursive'ness, you should get an error saying something on the order of "cannot fork".... (since each recursion will spawn a new process). Randy