From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1ffdab534421bb89 X-Google-Attributes: gid103376,public From: robert_dewar@my-dejanews.com Subject: Re: How to bypass CTRL-C? Date: 1999/01/28 Message-ID: <78pquj$6n9$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 437779963 References: <36AF61EE.93C36E67@videotron.com> X-Http-Proxy: 1.0 x7.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Jan 28 14:07:21 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-01-28T00:00:00+00:00 List-Id: In article <36AF61EE.93C36E67@videotron.com>, psx2@videotron.ca wrote: > The topic says it all. > How can I block the CTRL-C keys so that the > program can not terminate that way. This is of course highly implementation dependent. You should look at your compiler documentation. If you search for Ctrl-C in the secret GNAT archives (namely the GNAT Reference manual :-) you will find a paragraph on the Unreserve_All_Interrupts pragma, which is specifically there to let a programmer handle the Ctrl-C (and possibly other similar) interrupts. So this completely solves the problem with GNAT. If you are using some other compiler, go look in their documentation and hopefully you will find they have done something similar. If not, you will be on your own and have to do non-Ada fiddling. Documentation is useful stuff, try it some time :-) -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own