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,8893269a4640c798 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-24 07:55:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!feed.cgocable.net!read1.cgocable.net.POSTED!53ab2750!not-for-mail From: "Warren W. Gay VE3WWG" Newsgroups: comp.lang.ada References: <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> Subject: Re: terminate applications X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Thu, 24 Jul 2003 10:54:51 -0400 NNTP-Posting-Host: 24.150.168.167 X-Complaints-To: abuse@cogeco.ca X-Trace: read1.cgocable.net 1059058822 24.150.168.167 (Thu, 24 Jul 2003 11:00:22 EDT) NNTP-Posting-Date: Thu, 24 Jul 2003 11:00:22 EDT Organization: Cogeco Cable Xref: archiver1.google.com comp.lang.ada:40764 Date: 2003-07-24T10:54:51-04:00 List-Id: "Dmitry A. Kazakov" wrote in message news:ek2vhv4qcbtj4hspi2c0lojbtsh1baldql@4ax.com... > On Thu, 24 Jul 2003 01:47:36 GMT, Hyman Rosen > wrote: > > >Randy Brukardt wrote: > >> Finalization is the key to building maintainable abstractions, and we simply > >> cannot allow cases in which that finalization does not happen. > > > >But that's not really under your control. In Windows or UNIX, there are > >ways to immediately kill a program from the outside, regardless of what > >the program would prefer. > > [Yes, that small button, called "Reset" on the front panel!] > > If you don't believe Randy, then here is a quote from MSDN regarding > TerminateProcess: > > [QUOTE START] > ... 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. > ... > DLLs attached to the process are not notified that the process is > terminating. > > Terminating a process does not generate notifications for WH_CBT hook > procedures. > [QUOTE END] > > Read the above carefully, and you will understand, why one should > never ever do such a thing under Windows. And COM objects, where they do reference counting. Personally, I think a lot of this crap is due to bad design within Windows. Not that UNIX fully escapes these issues, but there seems to be fewer of these issues under UNIX. Unfortunately, there are still issues which require you to take some drastic action. Not everyone is prepared to wait until the next power failure for a hung process ;-) >> And these services are available to a program > >that wishes to invoke them, even on itself. So you don't gain anything > >by making believe that such a thing does not exist, and you get in the > >way of the programmer who has a perfectly good reason for wanting to do > >it. > > Probably the programmer has not done his homework. In a properly > designed system there is no need in things like that. Even less Ada > standard should encourage them. Perhaps, and perhaps not because it is due to an O/S bug where it blocks on an O/S call when it should return an error. Things are not always so cut and dry. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg