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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: How to tell whether program finalization can be suppressed Date: Mon, 04 Dec 2017 22:41:07 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="0970132c4bb3eb07ef75aca808a16c74"; logging-data="16735"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dKogniT9iHhfEj1ZY53/t8QOTh2Z0S0w=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:k8pHMhml6Jfpmw6pxSdpN+kNdXw= sha1:EeECnP/YWr2huuebbUNDqvdTrUE= Xref: reader02.eternal-september.org comp.lang.ada:49371 Date: 2017-12-04T22:41:07+00:00 List-Id: Simon Wright writes: > In any case, ARM 10.2(25)[1] doesn't appear to say that the main > program shouldn't exit, or that if it does the system should shut > down. Its last sentence is "When the environment task completes (normally or abnormally), it waits for the termination of all such tasks, and then finalizes any remaining objects of the partition." So, since I'm developing a Ravenscar RTS, with restrictions No_Task_Termination and No_Exception_Propagation (GNAT implementation-defined), the environment task will wait forever and the final finalization will not happen. Of course, if a task actually exits (not sure whether GNAT detects this at compile time) or a not-locally-handled exception occurs, we are in trouble, to the point where we don't need to worry about final finalization.