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 00:41:08 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: terminate applications Date: Thu, 24 Jul 2003 09:45:21 +0200 Message-ID: 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> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1059032467 18019911 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:40751 Date: 2003-07-24T09:45:21+02:00 List-Id: 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 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. --- Regards, Dmitry Kazakov www.dmitry-kazakov.de