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.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2def9aa85afa5d22 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-30 14:57:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!elk.ncren.net!nntp.upenn.edu!msunews!not-for-mail From: "Chad R. Meiners" Newsgroups: comp.lang.ada Subject: Re: Joint Strike Fighter Date: Fri, 30 Nov 2001 17:53:04 -0500 Organization: Michigan State University Message-ID: <9u920b$1thj$1@msunews.cl.msu.edu> References: <3BDCE159.39F6D422@adaworks.com> <11bf7180.0110290311.4d8d6f04@posting.google.com> <3BDF9C6A.C25520C5@adaworks.com> <3BE023AB.8F235EF5@sparc01.ftw.rsc.raytheon.com> <9rp8mo$6d8$1@nh.pace.co.uk> <11bf7180.0111010338.6dbc1537@posting.google.com> <9u5q9g$md$1@nh.pace.co.uk> Reply-To: "Chad R. Meiners" NNTP-Posting-Host: arctic.cse.msu.edu X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Xref: archiver1.google.com comp.lang.ada:17255 Date: 2001-11-30T17:53:04-05:00 List-Id: "Simon Wright" wrote in message news:x7v667sb4yc.fsf@galadriel.frlngtn.gecm.com... > procedure Close (The_Socket : in out Socket) is > Fd : Integer; > begin > Fd := The_Socket.Fd; > The_Socket.Fd := -1; -- indicate that The_Socket is now closed > if Close (Fd) < 0 then -- this is an import of the Unix close() > raise Close_Error; > end if; > end Close; So to clarify you want the procedure to either: 1. Close the socket normally 2. Fail to close the socket yet lose the file handle so the programmer can do nothing useful with the socket when he/she handles the exception. The second path seems like it would not be useful and it would be annoying since it introduces an unusable exception to handle. I conclude that you want to the invalidate the handle no matter what (since it is a result of both paths) so why do you not just silently ignore any errors given by the OS? -CRM