comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Terminate program in Ada95
Date: 2000/11/27
Date: 2000-11-27T00:00:00+00:00	[thread overview]
Message-ID: <wcc4s0tpifh.fsf@world.std.com> (raw)
In-Reply-To: 975328139.872809@edh3

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

"Atle R�stad" <aer@edh.ericsson.se> writes:

> How can I do an unconditionaly terminate of my program in Ada95?

You might want to use terminate alternatives in your tasks.
Or, you can call the operating system "exit" routine -- use pragma Import.
Or, you can abort them.
Or, you can abort the environment task, which will cause all subtasks to
also be aborted, thus killing the whole program.

To get your hands on the environment task, call Current_Task from the
env task -- that is, put something like this in a library package:

    Environment_Task: constant Task_ID := Current_Task;

You can then use Abort_Task on that.

Abortion will cause finalization actions to happen.
Calling "exit" probably will not; that's outside the language.

- Bob




  parent reply	other threads:[~2000-11-27  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-27  0:00 Terminate program in Ada95 Atle R�stad
2000-11-27  0:00 ` Alfred Hilscher
2000-11-27  0:00   ` Warren W. Gay VE3WWG
2000-11-27  0:00 ` Mats Weber
2000-11-27  0:00   ` Florian Weimer
2000-11-27  0:00 ` Robert A Duff [this message]
2000-11-27  0:00 ` Ted Dennison
2000-11-27  0:00 ` Marc A. Criley
replies disabled

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