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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!news.musoftware.de!wum.musoftware.de!news.tornevall.net!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada and (SIGTERM?) Date: Thu, 06 Aug 2009 12:57:03 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <42c9446c-76d2-4c82-abab-fd7c5573d85e@k30g2000yqf.googlegroups.com> <4244cbe7-1655-484b-a376-0237802ab37d@p10g2000prm.googlegroups.com> NNTP-Posting-Host: 2b3555a49d8fb2ce8eadf20c0aee782a Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fe9544d06628fabcb18bd2e591ae59b3 X-Complaints-To: abuse@tornevall.net X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-Validate-Post: http://news.tornevall.net/validate.php?trace=fe9544d06628fabcb18bd2e591ae59b3 X-SpeedUI: 1738 X-Complaints-Italiano: Parlo la lingua non � italiano User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) X-Posting-User: 9b22bfe2855937f9b3faeec7cfc91295 Xref: g2news2.google.com comp.lang.ada:7639 Date: 2009-08-06T12:57:03-07:00 List-Id: 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: .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