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-Thread: a07f3367d7,59929ddffbbb8400 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!postnews.google.com!f33g2000yqh.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: GNAT and SIGTERM (Linux x86_64) Date: Wed, 27 Oct 2010 00:43:26 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2d4bca6e-f38d-4bf4-9262-203287284e52@f33g2000yqh.googlegroups.com> References: <18db9616-3c2c-4dfa-8ef1-160e06c22b2d@c20g2000yqj.googlegroups.com> NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1288165406 2456 127.0.0.1 (27 Oct 2010 07:43:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 27 Oct 2010 07:43:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f33g2000yqh.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6) Gecko/2009012111 Red Hat/3.0.6-1.el5 Firefox/3.0.6,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:14819 Date: 2010-10-27T00:43:26-07:00 List-Id: Yannick Duch=EAne wrote on comp.lang.ada: > Signal_Handler is a type, and a type does not live on its own. To make it= =A0 > =93real=94, you have to instantiate an entity of that type. Good catch. > In few word : in Entry_Point, you forget to declare a variable of type = =A0 > Signal_Handler. > > Try this : > > =A0 procedure Entry_Point is > =A0 =A0 =A0Shutdown_Flag : Boolean :=3D False; > =A0 =A0 =A0Handler : Signal_Handler; -- < Add this line > =A0 begin > =A0 =A0 =A0[... remaining of you cool stuff] > =A0 end Entry_Point; > > It works :) Or, simply remove the "type" keyword from the declaration of Signal_Handler, i.e. --- signals.ads before +++ signals.ads after @@ -6,6 +6,6 @@ with Ada.Interrupts.Names; use Ada.Interrupts.Names; package Signals is pragma Unreserve_All_Interrupts; - protected type Signal_Handler is + protected Signal_Handler is procedure Handle_SIGTERM; pragma Attach_Handler(Handle_SIGTERM, SIGTERM); pragma Interrupt_State (SIGTERM, System); -- Ludovic Brenta. I love hand-writing unified diffs in the morning.