home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!mnemosyne.cs.du.edu!nyx!ilepore
- From: ilepore@nyx.cs.du.edu (Ian Lepore)
- Subject: Trapping ^C
- Message-ID: <1992Aug14.071027.24659@mnemosyne.cs.du.edu>
- Sender: usenet@mnemosyne.cs.du.edu (netnews admin account)
- Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
- Date: Fri, 14 Aug 92 07:10:27 GMT
- Lines: 19
-
- What's a good method of trapping a ^C from within a program and ignoring
- it? I've tried using the terminate handler (vector 0x0102) but that gets
- control on *any* type of program exit (ie, even if you called exit()). I
- can't find anything in the atari docs that says how to tell if the terminate
- handler was invoked by a detection of ^C in DOS, but (oddly enough) they
- call that vector the ^C handler in the docs.
-
- (Actually, leave out the "and ignoring it" part of that question. I can
- handle that part of it with a longjmp, I just need to be sure it's a ^C
- termination and not a normal program exit.)
-
- (Also, suggestions like "uninstall your 0x0102 handler in the exit()
- routine" are Not An Option for me -- the program could have done a Pterm()
- or a gemdos(0) or something else that I can't catch at all.)
-
- --
- - Ian
- (void *) where prohibited by law
-
-