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: 103376,be3d89c2ad66a506 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!easynet-monga!easynet.net!xara.net!gxn.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Advice on abort Date: Sun, 06 Nov 2005 20:08:39 +0000 Organization: Pushface Message-ID: References: <1131117934.372137.244900@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1131307718 12410 62.49.19.209 (6 Nov 2005 20:08:38 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 6 Nov 2005 20:08:38 +0000 (UTC) Cancel-Lock: sha1:V8XA6HTinAnynCC13aoKV7BZ/eo= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news1.google.com comp.lang.ada:6256 Date: 2005-11-06T20:08:39+00:00 List-Id: "REH" writes: > "Simon Wright" wrote in message > news:m2br0y9g9w.fsf@grendel.local... >> "REH" writes: >> >>> That's fine. We are VxWorks too. Besides, a return of 0 on a read >>> is not considered "successful" with sockets. It means the socket >>> has been closed. You got an exception on the next read, because you >>> were trying to read from a closed socket. >> >> Yes -- but the bug didn't show on Windows because of the different OS >> behaviour. > > I don't understand. What bug? A return of 0 is not a bug. I don't think > you've encountered different OS behavior. winsock will also return 0 from > read when a socket closes. If I understand you correctly, you've > encountered a particular behavior with GNAT on Windows, not Windows itself. > Or I may have completely misunderstood what you were saying. The bug in our software where we didn't check the length returned. Mind, I too think that we should have seen a return of 0 under Windows, and I am completely convinced (but the evidence isn't on this machine) that we didn't. We should see an End_Error from String'Input but instead we se a Socket_Error with 'connection reset by peer'. You could be right that it's a GNAT thing, but the GNAT code looks identical in this area.