home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.atari.st.tech
- Path: sparky!uunet!Cadence.COM!cadence.com!bammi
- From: bammi@acae127.cadence.com (Jwahar R. Bammi)
- Subject: Re: Trapping ^C
- In-Reply-To: ilepore@nyx.cs.du.edu's message of Fri, 14 Aug 92 07:10:27 GMT
- Message-ID: <BAMMI.92Aug15110353@acae127.cadence.com>
- Sender: usenet@Cadence.COM (Usenet News)
- Nntp-Posting-Host: acae127
- Organization: Cadence Design Systems
- References: <1992Aug14.071027.24659@mnemosyne.cs.du.edu>
- Date: Mon, 3 Aug 1992 03:19:53 GMT
- Lines: 21
-
- In article <1992Aug14.071027.24659@mnemosyne.cs.du.edu> ilepore@nyx.cs.du.edu (Ian Lepore) writes:
-
- > 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
-
- depends on your env. if you can link with a decent C library,
- then installing our own handler using signal(SIGINT, myhandler)
- is probably the easiest. note that under TOS the handler will be
- invoked only on the next console i/o. under MiNT it will be "instantaneous".
-
- if not, you have to detect ^C at the console yourself. under
- MiNT you can install your own handler using <mintbind.h>
-
- cheers,
- --
- --
- bang: uunet!cadence!bammi jwahar r. bammi
- domain: bammi@cadence.com
- GEnie: J.Bammi
- CIS: 71515,155
-