Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 +2.11; site dcl-cs.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!bellcore!decvax!genrad!grkermi!panda!talcott!harvard!seismo!mcvax!ukc!icdoc!dcl-cs!stephen From: stephen@dcl-cs.UUCP Newsgroups: net.unix-wizards Subject: Re: Bug iwith setjmp/longjmp on Vax Message-ID: <210@dcl-cs.UUCP> Date: Sun, 9-Jun-85 00:25:26 EDT Article-I.D.: dcl-cs.210 Posted: Sun Jun 9 00:25:26 1985 Date-Received: Tue, 11-Jun-85 03:56:14 EDT References: <44700008@gypsy.UUCP> Reply-To: stephen@dcl-cs.UUCP (Stephen J. Muir) Organization: Department of Computing at Lancaster University. Lines: 29 Xpath: icdoc ivax In article <44700008@gypsy.UUCP> rosen@gypsy.UUCP writes: >This program was compiled under 4.2BSD on a VAX; it doesn't work the way it >should (I get a 'longjmp botch' message). If I compile the same exact >program on a Sun running 4.2BSD it works fine. I know that setjmp() and >longjmp() work on a Vax, but why is this simple program giving me a problem? > >/* setjmp() - longjmp() test program */ >#include >static jmp_buf env; >int mode; > >main(){ > foo(); > longjmp(env, 1); >} > >foo(){ > > mode = setjmp(env); > if (mode != 0) magic(); >} It has always been my understanding that "longjmp()" is used to jump OUT of routines - not INTO them! -- Name: Stephen J. Muir Project:Alvey ECLIPSE Distribution JANET: stephen@uk.ac.lancs.comp DARPA: stephen%lancs.comp@ucl-cs UUCP: ...!ukc!icdoc!dcl-cs!stephen Phone: +44 524 65201 Ext. 4599 Post: Department of Computing, University of Lancaster, Bailrigg, Lancaster. LA1 4YR