comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: exit a program
Date: Mon, 3 Aug 2009 01:17:25 -0700 (PDT)
Date: 2009-08-03T01:17:25-07:00	[thread overview]
Message-ID: <7737506d-395c-441e-ab21-78cb2f7b2bfb@24g2000yqm.googlegroups.com> (raw)
In-Reply-To: qpdo3k8hc2ux.amwpw73r6i5n$.dlg@40tude.net

On 2 Sie, 14:43, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
wrote:

> > is there an instruction that stops a program?
>
> No, because it is ill-defined.
>
> In order to define "stop of a program" consider what happens with the
> system resources allocated by the program (open files, shared libraries,
> sockets etc)

Shared libraries and sockets are out of Ada scope. If you are using
them, then you apparently already know what you are doing.

Files are in the scope and are handled (A.7/6):

"The language does not define what happens to external files after the
completion of the main program and all the library tasks"

I guess it is up to the implementation to fill this gap.
In other words, the concept of stopping the program is not ill-
defined...

> > i need to stop a program and return to o.s. in case of an exception.
>
> Let it propagate out of the main task, that will terminate the program.

and you even give instructions on how it can be done. ;-)

--
Maciej Sobczak * www.msobczak.com * www.inspirel.com

Database Access Library for Ada: www.inspirel.com/soci-ada



  reply	other threads:[~2009-08-03  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-02 12:13 exit a program Autoscontro difettoso
2009-08-02 12:43 ` Dmitry A. Kazakov
2009-08-03  8:17   ` Maciej Sobczak [this message]
2009-08-03  9:45     ` Dmitry A. Kazakov
2009-08-02 14:38 ` Robert A Duff
replies disabled

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