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-29 03:10:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!b8aa1.pppool.DE!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: stupid question: how can I finish a program? Date: Fri, 30 Aug 2002 00:16:57 +0200 Message-ID: References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: b8aa1.pppool.de (213.7.138.161) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1030615804 54002682 213.7.138.161 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:28544 Date: 2002-08-30T00:16:57+02:00 List-Id: Marin D. Condic wrote: > Oh, and how could it be defined in a portable way? C does it with a couple > of standard functions. Ada can make standard subprograms too, so why not? > Probably (since it is an OS dependent thing and might not have meaning > outside the context of an OS) there should be some sort of standard > package like "Ada.OS_Services" that contained proccedure(s) to connect to > whatever the OS provides. (I hear something like this is in the works) > > There can't be *that* many different ways of killing the process that a > reasonable compromise answer couldn't be found. What more would be needed > than a "Kill_The_Process (Optional_Integer_Return_Code_For_Unix_Freaks) ;" > call? Would it need to be dramatically different between Unix/Windows/Mac? > Would anyone care if it couldn't be implemented easily on some obscure OS? > 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 > like Rocket Science to me - nor does it sound like a horendous burden on > the compiler writers. The only real question could be "Is it reasonably > useful to have such an operation?" and I think the answer is "Yes". Consider Windows. To kill a process, does not mean that all DLLs and all non-standard drivers it used get notified. Which also means that even if you have killed a process the system is not brought to the state it had before the process start. Yes, you can define a procedure Kill_The_Process but you cannot specifiy what this procedure does! Which resources will be freed? Will they available after procedure completion? What about access rights? So the single thing which will be portable is the name of the procedure. (:-)) -- Regards, Dmitry Kazakov www.dmitry-kazakov.de