Path: utzoo!mnetor!uunet!husc6!tut.cis.ohio-state.edu!uwmcsd1!ig!agate!pasteur!ames!lll-lcc!unisoft!gethen!bdt!david From: david@bdt.UUCP (David Beckemeyer) Newsgroups: comp.sys.atari.st Subject: Re: C and autostarting GEM programs Message-ID: <189@bdt.UUCP> Date: 21 Mar 88 19:15:29 GMT References: <176@bdt.UUCP> <1018@atari.UUCP> Reply-To: david@bdt.UUCP (David Beckemeyer) Organization: Beckemeyer Development Tools, Oakland, CA Lines: 29 In article <1018@atari.UUCP> apratt@atari.UUCP (Allan Pratt) writes: >You misunderstand me. By "Pterm handler" I meant the thing YOU might >install to catch bombs, Pterm's, and ^C's yourself. *Of course* Pterm >is more complicated than that in Gemdos: it has to free your memory, >close your files, and so on. No you misunderstand me. I know exactly what a Pterm handler is. I posted my original message not to help you, Allan, (I know you know what they should do), but to help others. Somebody originally stated that the Pterm (^C 0x102 vector) could just be a longjmp. And all I was trying to say was that it was a little bit more than this, and gave a definition of "clean up and then longjmp". Then you posted an excellent example of a Pterm/^C handler that demonstrates how you do exactly that (clean up and then longjmp). Where "clean up" depends on the application, and may be "null" in the degenerate case. The whole thing became a much longer discussion that it ever should have been. It's my fault for saying something, and not doing what you did and just give a good example. But to try and make my point one more time. All I'm trying to say is that there *are* cases, depending on the state of the application, where a simple longjmp, and no "clean up" (whether handled by the Pterm handler itself, or its target) will result in an upset system. -- David Beckemeyer | "To understand ranch lingo all yuh Beckemeyer Development Tools | have to do is to know in advance what 478 Santa Clara Ave, Oakland, CA 94610 | the other feller means an' then pay UUCP: ...!ihnp4!hoptoad!bdt!david | no attention to what he says"