comp.lang.ada
 help / color / mirror / Atom feed
From: "Nick Roberts" <nickroberts@blueyonder.co.uk>
Subject: Re: terminate applications
Date: Sat, 26 Jul 2003 16:23:08 +0100
Date: 2003-07-26T16:23:08+01:00	[thread overview]
Message-ID: <bfu697$j1mk7$1@ID-25716.news.uni-berlin.de> (raw)
In-Reply-To: 3F227F16.2010908@noplace.com

"Marin David Condic" <nobody@noplace.com> wrote in message
news:3F227F16.2010908@noplace.com...

> The critical point being that if you *don't* give the
> programmer the choice, he'll just do an end-run
> around you anyway and resent the fact that he has
> to go outside the language to get what he wants.

I think it might be valuable to add to the standard library a procedure,
perhaps:

   procedure Ada.Unsafe_Terminate_Program;

The RM could define the execution of this procedure maybe as follows:

----------

Dynamic Semantics

Unsafe_Terminate_Program causes the execution of all the tasks in all the
partitions of the program to immediately cease execution. No finalization
occurs, and execution within abort-deferred regions will be terminated
without any deferral. A call to Unsafe_Terminate_Program never returns. The
time or place at which each task ceases is undefined.

Implementation Requirements

Implementations must document all the potential consequences of the
execution of Unsafe_Terminate_Program which are different to those of normal
program termination.

Implementation Permissions

An implementation may omit Unsafe_Terminate_Program if it would be
unreasonable (or too dangerous) to provide it. The mechanisms used by an
implementation to cause the cessation of execution in tasks other than the
calling task (especially those in separate partitions) is undefined, thus
the speed at which this cessation is propagated, and whether it may or may
not succeed in being propagated to all tasks in a program, is undefined. An
implementation may perform some or all finalization, if it would be
unreasonable not to. An implementation may allow some or all executions
within abort-deferred regions to complete before cessation, if it would be
unreasonable to do otherwise.

Notes

It is intended that Unsafe_Program_Termination not only avoids any
finalization or completion of abort-deferred regions in any part of the Ada
program itself, but also that it avoids as much of the normal termination
actions associated with the execution environment as reasonably possible
(e.g. finalizations within a run-time environment). It is recommended that
Unsafe_Program_Termination is used only as a last resort, when all other
attempts at bringing a program to completion have failed. It is recommended
that Unsafe_Program_Termination is not used in deliverable software unless
its use is considered unavoidable. It is strongly recommended that whenever
a program which could possibly execute Unsafe_Program_Termination is
deployed in a different execution environment, or a change is made to that
environment, a thorough check is made as to the worst possible consequences
of its execution.

----------

I think this suggestion makes it clear that: the semantics of such a
procedure would be difficult to define, and impossible to enforce or test;
it truly could be really dangerous in some environments. You might consider
all the above a bit too much to add to the RM to be worth it.

--
Nick Roberts
Jabber: debater@charente.de [ICQ: 159718630]






  reply	other threads:[~2003-07-26 15:23 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
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 [this message]
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