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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bdf72b2364b0da13 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.191.41 with SMTP id gv9mr9667276pbc.5.1323706112872; Mon, 12 Dec 2011 08:08:32 -0800 (PST) Path: lh20ni14513pbb.0!nntp.google.com!news1.google.com!postnews.google.com!y7g2000vbe.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?bj=F6rn_lundin?= Newsgroups: comp.lang.ada Subject: Re: Interrupts handling in ADA Date: Mon, 12 Dec 2011 07:23:56 -0800 (PST) Organization: http://groups.google.com Message-ID: <9ab7f79f-fdfc-4f76-adbc-4bb64fc19187@y7g2000vbe.googlegroups.com> References: <30143086.6.1323549838421.JavaMail.geo-discussion-forums@vbbfq24> NNTP-Posting-Host: 85.230.240.167 Mime-Version: 1.0 X-Trace: posting.google.com 1323706112 4439 127.0.0.1 (12 Dec 2011 16:08:32 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 12 Dec 2011 16:08:32 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: y7g2000vbe.googlegroups.com; posting-host=85.230.240.167; posting-account=3_reEwoAAAC163IAIrx427KYmwahFuh9 User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HUALESNKRC X-HTTP-UserAgent: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:8.0) Gecko/20100101 Firefox/8.0,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-12-12T07:23:56-08:00 List-Id: On 12 Dec, 04:19, a...@att.net wrote: > =A0 exception > =A0 =A0 when Socket_Error =3D> > =A0 =A0 =A0 =A0 if Main'Callable then > =A0 =A0 =A0 =A0 =A0 Main.Dead ( 1 ) ; > =A0 =A0 =A0 =A0 end if ; > =A0 =A0 =A0 =A0 Close_Socket ( Socket ) ; > =A0 end One ; > Another small nit-picking note. The call to Main.Dead may still cause Tasking_Error, since the result of Main'Callable may have changed during the time between the check and the call. Unlikely yes, but still. when Socket_Error =3D> begin Main.Dead ( 1 ) ; exception when Tasking_Error =3D> null; -- or printout end; Close_Socket ( Socket ) ; end One ; This way the call to Main.Dead will succeed or not, but Close_Socket will always be called -- Bj=F6rn Lundin