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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,f6ee8ca03c176d76 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-29 10:10:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!howland.erols.net!torn!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Message-ID: <3D6E52EF.2010406@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020618 Netscape/7.0b1 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: stupid question: how can I finish a program? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 29 Aug 2002 12:59:27 -0400 NNTP-Posting-Host: 198.96.47.195 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1030640324 198.96.47.195 (Thu, 29 Aug 2002 12:58:44 EDT) NNTP-Posting-Date: Thu, 29 Aug 2002 12:58:44 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:28564 Date: 2002-08-29T12:59:27-04:00 List-Id: Dmitry A.Kazakov wrote: > 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. (:-)) The other question that comes up with COM objects is whether or not the object should be "unreferenced". But if you do allow the unref call, then other code may run that may experience "difficulties". The UNIX equivalent of a kill -9 in windows would leave many COM objects referenced after the processes are gone. Yuk. I smell another reboot coming on ;-) -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg