comp.lang.ada
 help / color / mirror / Atom feed
* problem with ada.interrupts
@ 2005-08-10 16:01 evangeli
  2005-08-10 18:00 ` Robert A Duff
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: evangeli @ 2005-08-10 16:01 UTC (permalink / raw)


hello
in my program i want to catch the interruption by the user, e.g.,
ctrl+c.
i looked at the RM and it seems that package ada.interrupts is designed
to do this kind of things.
so i tested this little program (my compiler is gnat 3.15p) :


with
  Ada.Interrupts,
  Ada.Interrupts.Names,
  Ada.Text_Io;

procedure Test is

   protected Interruption_Handler is
      procedure SIGINT_Handler;
   end Interruption_Handler;
   protected body Interruption_Handler is
      procedure SIGINT_Handler is
      begin
         Ada.Text_Io.Put_Line("interruption");
      end;
   end Interruption_Handler;

begin

Ada.Interrupts.Attach_Handler(Interruption_Handler.SIGINT_Handler'Access,
                                 Ada.Interrupts.Names.SIGINT);
   Ada.Text_Io.Put_Line("ok");
   delay 5.0;
end;


this compiles fine, but when i launch it, nothing happens (not even the
put_line("ok")).
it seems that even this little program does not terminate :

with
  Ada.Interrupts;

procedure Test is
begin
   null:
end;

i suspect a problem in the elaboration of package Ada.Interrupts, but i
have no idea of how to deal with it.
any idea?

Thanks for any help

Sami




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-25 12:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-10 16:01 problem with ada.interrupts evangeli
2005-08-10 18:00 ` Robert A Duff
2005-08-10 18:19 ` jimmaureenrogers
2005-08-25 12:25 ` Thierry Pirot

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