comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: terminate applications
Date: Thu, 24 Jul 2003 15:12:51 -0500
Date: 2003-07-24T15:12:51-05:00	[thread overview]
Message-ID: <vi0favi91fib92@corp.supernews.com> (raw)
In-Reply-To: YUGTa.22178$0F4.4025@nwrdny02.gnilink.net

"Hyman Rosen" <hyrosen@mail.com> wrote in message
news:YUGTa.22178$0F4.4025@nwrdny02.gnilink.net...
> 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.

Of course, the "outside force" killing cannot be avoided. But users
hopefully know that doing such things is dangerous. Windows pops up a
warning whenever you try to kill a process from the GUI, for instance.

> 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.

Ah, but we're talking about what goes into the language standard, not what a
programmer might do in some circumstance.

Moreover, I do not believe that there are many (if any at all) "perfectly
good reasons" for unsafely killing yourself. (The standard cannot talk about
killing other partitions; everything about running partitions is
implementation-defined.) You need to do it if the program is hung, of
course, but in that case it is clear that an outside force has to do it. If
the program is not hung, there is little value to not doing it safely.
Presuming Finalize routines are written to be fault-tolerant (which they
have to be for reasons having nothing to do with program exiting), there is
no problem with exiting the program with the finalization. If the
finalization takes a long time, then there is something seriously wrong with
the program design, and that should be addresses, not some suicide package.

This need, if it really exists at all, is so rare that I see no reason for
it to be included in the standard. OTOH, I would not object to a safe Halt
routine (which was defined to be the same as aborting the environment task)
which would be (A) well-defined; (B) wouldn't leave critical resources in an
undefined state; and (C) be more convinient, especially if you are in some
other task. (To abort the environment task requires planning ahead, and it
would be of value to avoid that). That would be enough in 99% of the cases,
and moreover, the presence of such a routine would prod vendors to insure
that aborting the environment task actually works.

An Unconditional_Exit routine would have to essentially say "Causes the
program to end as soon as possible. It is unspecified whether any
finalization is done before the program exits and how any tasks are
terminated." And then it would have to be followed with a note suggesting
that it be used with extreme caution. I don't see the point.

                                Randy.






  parent reply	other threads:[~2003-07-24 20:12 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-18  9:36 terminate applications christoph.grein
2003-07-18 10:54 ` Jeffrey Creem
2003-07-18 11:51   ` Marin David Condic
2003-07-18 13:26     ` Nick Roberts
2003-07-18 15:18     ` Jeffrey Creem
2003-07-19 15:44       ` Marin David Condic
2003-07-20  2:03         ` Robert I. Eachus
2003-07-20 11:04           ` Marin David Condic
2003-07-20 17:53             ` Robert I. Eachus
2003-07-21 12:02               ` Marin David Condic
2003-07-21 20:31                 ` Robert I. Eachus
2003-07-22 12:11                   ` Marin David Condic
2003-07-22 12:26                     ` Arnaud Charlet
2003-07-22 12:36                       ` Marin David Condic
2003-07-22 13:23                         ` Arnaud Charlet
2003-07-22 23:23                           ` Marin David Condic
2003-07-22 23:46                             ` Samuel Tardieu
2003-07-23 12:22                               ` Marin David Condic
2003-07-23 22:17                                 ` Randy Brukardt
2003-07-24  1:47                                   ` Hyman Rosen
2003-07-24  3:36                                     ` tmoran
2003-07-24  3:44                                       ` Hyman Rosen
2003-07-24  8:02                                         ` Samuel Tardieu
2003-07-24 19:54                                         ` Randy Brukardt
2003-07-24  7:45                                     ` Dmitry A. Kazakov
2003-07-24 14:54                                       ` Warren W. Gay VE3WWG
2003-07-24 15:46                                         ` Dmitry A. Kazakov
2003-07-26  2:58                                           ` Warren W. Gay VE3WWG
2003-07-28  8:17                                             ` Dmitry A. Kazakov
2003-07-28 21:08                                               ` Warren W. Gay VE3WWG
2003-07-29 10:42                                                 ` Marin David Condic
2003-07-29 13:47                                                   ` Hyman Rosen
2003-07-29 17:04                                                     ` Warren W. Gay VE3WWG
2003-07-24 12:01                                     ` Marin David Condic
2003-07-24 20:12                                     ` Randy Brukardt [this message]
2003-07-24 23:11                                       ` Robert I. Eachus
2003-07-26 12:52                                         ` Marin David Condic
2003-07-26  3:28                                       ` Warren W. Gay VE3WWG
2003-07-24 11:51                                   ` Marin David Condic
2003-07-24 20:32                                     ` Randy Brukardt
2003-07-26  3:16                                       ` Warren W. Gay VE3WWG
2003-07-26 13:16                                         ` Marin David Condic
2003-07-26 15:23                                           ` Nick Roberts
2003-07-26 15:48                                             ` Warren W. Gay VE3WWG
2003-07-27 11:36                                             ` Marin David Condic
2003-07-26 19:52                                           ` rleif
2003-07-26 13:01                                       ` Marin David Condic
2003-07-24 14:46                                   ` Warren W. Gay VE3WWG
2003-07-24 18:50                                     ` tmoran
2003-07-26 13:21                                       ` Marin David Condic
2003-07-23  4:02                             ` Robert I. Eachus
2003-07-23 12:28                               ` Marin David Condic
2003-07-24 16:06                                 ` Robert I. Eachus
2003-07-26 13:33                         ` Larry Kilgallen
     [not found]                         ` <Pine.LNX.4.44.0307221518190.26977-10000Organization: LJK Software <$TwrUBtoh25l@eisner.encompasserve.org>
2003-07-26 15:07                           ` Warren W. Gay VE3WWG
2003-07-27 11:43                           ` Marin David Condic
2003-07-26 17:27                         ` Larry Kilgallen
     [not found]                         ` <Pine.LNX.4.44.0307221518190.26977-10000Organization: LJK Software <etldVqgp8sE1@eisner.encompasserve.org>
2003-07-26 20:18                           ` Warren W. Gay VE3WWG
2003-07-26 20:24                         ` Larry Kilgallen
     [not found]                         ` <Pine.LNX.4.44.0307221518190.26977-10000Organization: LJK Software <q5jLYypXp6Yg@eisner.encompasserve.org>
2003-07-27 21:52                           ` Warren W. Gay VE3WWG
2003-07-28  2:45                         ` Larry Kilgallen
2003-08-01 17:00                           ` Warren W. Gay VE3WWG
2003-08-01 17:56                         ` Larry Kilgallen
2003-08-01 18:17                           ` Warren W. Gay VE3WWG
2003-08-01 18:48                         ` Larry Kilgallen
2003-07-22 12:59                       ` Lutz Donnerhacke
2003-07-22  5:16                 ` Randy Brukardt
2003-07-22 12:02                   ` Marin David Condic
2003-07-22 14:45                     ` Nick Roberts
2003-07-23  1:08 ` Dave Thompson
  -- strict thread matches above, loose matches on Subject: below --
2003-07-17 10:39 Riccardo
2003-07-17 19:54 ` Nick Roberts
2003-07-17 20:55   ` Mark A. Biggar
2003-07-17 22:44     ` Nick Roberts
2003-07-18  3:55 ` sk
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox