comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.acm.org>
Subject: Re: Ada and (SIGTERM?)
Date: Thu, 06 Aug 2009 12:57:03 -0700
Date: 2009-08-06T12:57:03-07:00	[thread overview]
Message-ID: <h5fcat$32d$1@news.tornevall.net> (raw)
In-Reply-To: <a48ec6ae-c0c8-41fb-bdba-2c63c9411028@r24g2000vbn.googlegroups.com>

Tomek Wałkuski wrote:
> Thx for replies, but... what am I doing wrong?
> 
> protected type Interrupt_Handler is
>    procedure Handler;
>    pragma Attach_Handler (Handler, 15); -- is it correct for SIGTERM?

You probably only want a single handler for interrupt 15. So either this should 
be an object rather than a type, or it should have a discriminant to indicate 
the interrupt to handle.

Check your vendor's Ada.Interrupts.Names for the interrupts you can handle on 
your system.

> while not Quit loop
>    Do_Something;
> end loop;
> 
> And... This does not work. What am I missing?

Quit is inside an object of type Interrupt_Handler, and so must be referenced 
using dot notation:

<object>.Quit

"Does not work" is rather vague. Saying "gives me a compilation error with the 
message 'xyz'" or "raises Xyz at run time" or "causes my computer to explode" 
would make it easier to help you.

-- 
Jeff Carter
"Blessed are they who convert their neighbors'
oxen, for they shall inhibit their girth."
Monty Python's Life of Brian
83



  reply	other threads:[~2009-08-06 19:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-05 19:58 Ada and (SIGTERM?) Tomek Walkuski
2009-08-06  1:06 ` Adam Beneschan
2009-08-06 18:13   ` sjw
2009-08-06 18:48     ` Adam Beneschan
2009-08-06 19:30   ` Tomek Wałkuski
2009-08-06 19:57     ` Jeffrey R. Carter [this message]
2009-08-06 20:02       ` Tomek Wałkuski
2009-08-06 20:00     ` okellogg
2009-08-08 13:11     ` Tomek Wałkuski
2009-08-08 15:06       ` Maciej Sobczak
2009-08-08 17:53         ` Tomek Wałkuski
2009-08-16 13:11           ` Tomek Wałkuski
2009-08-16 15:47             ` Maciej Sobczak
replies disabled

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