🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #30610

Re: <Control> C and autostarting GEM programs

#30610
From: Allan Pratt
Date: Tue, 16 Feb 1988 22:37
23 lines
1431 bytes
in article <4803@ihlpg.ATT.COM>, tainter@ihlpg.ATT.COM (Tainter) says:
>> This vector gets called when you use Pterm(), too: it's not strictly a
>> "control C" handler. 
> 
> This last bit makes it worthless, unless you can tell us how to tell if
> we are getting a ^C or a Pterm().
> --j.a.tainter

You're getting a Pterm if you call Pterm, and you're getting ^C if you
don't.  If you know you're calling Pterm, then call your clean-up
routine on your own and un-install it before you terminate.

Also un-install your terminate vector before you Pexec: you can tell
what the result of the Pexec was by the return code: -32L means the
child terminated with ^C.  Any other LONG negative value means the
Pexec failed, and any LONG positive value (i.e. (x & 0xffff0000) == 0)
means it called Pterm(x).

Please don't shoot words like "worthless" around unqualified.

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt
Technical Details
Message-ID: <980@atari.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!decvax!decwrl!sun!imagen!atari!apratt
References: <4803@ihlpg.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!decvax!decwrl!sun!imagen!atari!apratt
From: apratt@atari.UUCP (Allan Pratt)
Newsgroups: comp.sys.atari.st
Subject: Re: <Control> C and autostarting GEM programs
Message-ID: <980@atari.UUCP>
Date: 16 Feb 88 22:37:08 GMT
References: <4803@ihlpg.ATT.COM>
Organization: Atari Corp., Sunnyvale CA
Lines: 23