Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!mintaka!think!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!cwns1!chet From: chet@cwns1.CWRU.EDU (Chet Ramey) Newsgroups: gnu.bash.bug Subject: Re: Strange behavior with functions Message-ID: <1989Dec21.004941.3184@usenet.ins.cwru.edu> Date: 21 Dec 89 00:49:41 GMT References: <13771@reed.UUCP> Reply-To: chet@po.CWRU.Edu (Chet Ramey) Organization: Case Western Reserve Univ. Cleveland, Ohio, (USA) Lines: 21 In article <13771@reed.UUCP> trost@reed.bitnet (Bill Trost) writes: [another neat script, this one for reversing files] >Of course, Chet has probably already fixed it.... :-) Yup, and I sent the fix to Brian again today (just for good measure :-). If anyone's interested, it has to do with using a single global jump_buf to implement `return' with longjmp. This obviously screws recursive functions or functions that call other functions; the first function to call `return' gets the right jump_buf and leaves all the others in the twilight zone (I've seen `main' get re-executed on my IBM RT running 4.3 for a really pathological case). Chet Ramey -- Chet Ramey Network Services Group "Where's my froggie?" Case Western Reserve University chet@ins.CWRU.Edu