comp.lang.ada
 help / color / mirror / Atom feed
From: Geert Bosch <bosch@amazone.gnat.com>
Subject: Re: How to bypass CTRL-C?
Date: 1999/01/28
Date: 1999-01-28T00:00:00+00:00	[thread overview]
Message-ID: <36B06372.FC9841EC@amazone.gnat.com> (raw)
In-Reply-To: 36AF61EE.93C36E67@videotron.com

This issue is partly compiler/platform specific. If you're 
using GNAT, be sure to browse the documentation and have
a look at the "features" file for things new in GNAT 3.11p:

|  A new pragma Unreserve_All_Interrupts allows an implementation to
|  specify that normally reserved interrupts (e.g. SIGINT for handling
|  Ctrl-C) are to be unreserved, so that the application program may
|  handle these interrupts as it pleases.

In your case this pragma alone would be enough, as you do not actually
want to handle the interrupt but only want to prevent the system from
handling it for you. So you do not have to install a handler, although
you might want to do so for printing an error message 
  (like "*** program cannot be interrupted ***")
or to register the request and terminate as soon as possible.

Note that the mechanisms to actually install handlers for interrupts
is part of the language and support for interrupts is provided by
all compilers implementing Annex C (Systems Programming).

Regards,
   Geert




  parent reply	other threads:[~1999-01-28  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-27  0:00 How to bypass CTRL-C? psx2
1999-01-27  0:00 ` Larry Kilgallen
1999-01-28  0:00 ` robert_dewar
1999-01-28  0:00 ` bourguet
1999-01-28  0:00 ` Geert Bosch [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-01-28  0:00 John Herro
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox