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, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6ee8ca03c176d76 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-30 07:33:21 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!b8859.pppool.DE!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: stupid question: how can I finish a program? Date: Sat, 31 Aug 2002 04:40:12 +0200 Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: b8859.pppool.de (213.7.136.89) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1030717999 55287848 213.7.136.89 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:28595 Date: 2002-08-31T04:40:12+02:00 List-Id: Marin D. Condic wrote: > Yes, I understand that there are potential issues as to what exactly > happens from one OS to another and I understand that there are dangers in > its use because its behavior can't necessarily deal with everything > cleanly or do what you would want it to do under the circumstances. But > note that a) Windows does provide an OS call to abort the process They (MS) wrote the following about it: "The TerminateProcess function is used to unconditionally cause a process to exit. Use it only in extreme circumstances. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used rather than ExitProcess." -- MSDN library > and b) I said the following: >> > Would the formal definition need to be any more complicated than: >> > "Implementation Defined - but we suggest that you make it do what any >> > sane person using the target OS would reasonably expect..."? It >> > doesn't seem > (In other words, you could have it make monkeys fly out of your nose, but > a sane person would expect it to call the OS provided "abort" procedure > and do whatever that does.) I have only one objection - this cannot be called "portable". There is also a problem, where do you want to stop? Portable sockets? Pipes? Mailboxes? FTP? 2D-graphics? 3D? SQL? ... Not that I am against all that (:-)), but it will be very hard to do. > Just because there is no absolutely safe or absolutely portable or > absolutely consistent way of doing something in Ada, doesn't mean it > shouldn't be done. A complaint that a lot of C programmers have about Ada > is that it keeps stoping them from doing what they want to do. Sometimes > that is a good thing, but sometimes its just plain stubbornness on the > part of Ada insisting that because an answer isn't "perfect" that it won't > provide one that is "good enough". Providing a portable interface to what > ANSI C calls "abort();" (and similar...) doesn't sound like something that > should be avoided just because it might be misused or that the results > might not be consistent across all platforms. Well, if so little is required then Annex B is a perfect place for this: Interfaces.POSIX Interfaces.VMS Interfaces.Win32 ... -- Regards, Dmitry Kazakov www.dmitry-kazakov.de