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.8 required=5.0 tests=BAYES_00, GUARANTEED_100_PERCENT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8893269a4640c798 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-26 06:01:31 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!harp.news.atl.earthlink.net!not-for-mail From: Marin David Condic Newsgroups: comp.lang.ada Subject: Re: terminate applications Date: Sat, 26 Jul 2003 09:01:22 -0400 Organization: MindSpring Enterprises Message-ID: <3F227BA2.40307@noplace.com> References: <3F17DF3C.4080204@noplace.com> <3F196773.2060809@noplace.com> <3F19F86C.9050808@attbi.com> <3F1A772F.9060708@noplace.com> <3F1AD6FB.8080806@attbi.com> <3F1BD666.6040506@noplace.com> <3F1C4DA6.3070405@attbi.com> <3F1D29E8.60107@noplace.com> <3F1D2FDC.1070402@noplace.com> <3F1DC75A.5050300@noplace.com> <87oezm9lar.fsf@inf.enst.fr> <3F1E7E1E.8090302@noplace.com> <3F1FC849.8070202@noplace.com> NNTP-Posting-Host: d1.56.b2.22 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Server-Date: 26 Jul 2003 13:01:30 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03) X-Accept-Language: en-us, en Xref: archiver1.google.com comp.lang.ada:40829 Date: 2003-07-26T13:01:30+00:00 List-Id: Because Ada can't guarantee that at all times and under all conditions it can shoot the process in the head (apparently). If you have tasks that are hung up in some OS operation and you want to kill the process as a result, you probably have to rely on the OS. And then you have to live with the weaknesses of the OS - which you already had to do because you were making OS calls. What is wrong with making OS calls? Yes, it isn't perfectly safe. No I won't stop doing it. Please give me a common, conventional, portable interface to the OS so I can do the dangerous things I want to do and then port my dangerous code to another OS or compiler with relative ease. :-) If Ada can find a way of saying "Here's a safe, reliable HALT subprogram that is 100% guaranteed to kill the program no matter what" I say "Fine". However, I suspect that the only way to get the 100% guarantee part is to hook to the OS that may be hanging up a task. Hence you lose some safety. That's fine with me. I promise I'll only use it in extreme cases. MDC Randy Brukardt wrote: > "Marin David Condic" wrote in message > news:3F1FC849.8070202@noplace.com... > >>If most OS's provide a given feature, there ought to be a way for an Ada >>program to utilize that feature in a standard way. Worrying about the >>fact that some OS provided feature might not fit in with Ada's desired >>safety and security is what is going to guarantee that programmers are >>going to do end-runs around Ada to use the C/C++ library that *will* >>give them the feature - and eventually decide that its too much of a >>nuisance to be programming in both Ada and C and revert to C. > > > I agree that common operations from the OS ought to be supported in a > standard way. But I disagree that that includes dangerous operations. > > Don't you think that if the standard Ada library provided a safe Halt > routine, people would use that, and 98% of the time, it would be perfectly > adaquate? I cannot remember a case (either from us or from our users) where > someone said that System.Util.Halt was too slow or hung. > > Similarly, if Ada provided "safe" libraries of OS operations, don't you > think people would use them? Do you really think that people would say that > such-and-such an operation is safe, so I won't use it? > > Why should we go on propagating the mistakes of our forefathers? The > functionality is the important point, not the exact form or details. If you > don't believe that - if you believe that Ada can't be object-oriented > because it doesn't declare "class"es, for instance - then you SHOULD be > using C++. Ada has nothing to offer you then. > > We should stick with "safe", well-defined operations in the standard Ada > library. After all, people will use those first. If they absolutely have to > use an unsafe operation, fine, but they'll have to do it by a direct > interface to the OS (making the OS dependence clear). > > (For what's its worth, the C Exit is a safe exit -- for C. It does lots of > finalization activities before it actually exits. Why should Ada be > different in that regard?) > > Randy. > > > -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jast.mil/ Send Replies To: m c o n d i c @ a c m . o r g "In general the art of government consists in taking as much money as possible from one class of citizens to give to the other." -- Voltaire ======================================================================