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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bff0c2e09500f856 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-05 23:46:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!newsfeed.newzpig.com!intgwlon.nntp.telstra.net!news.telstra.net!news-server.bigpond.net.au!not-for-mail From: Dale Stanbrough Newsgroups: comp.lang.ada Subject: Re: How do I end the program? Organization: RMIT References: User-Agent: MT-NewsWatcher/3.1 (PPC) Message-ID: Date: Wed, 06 Feb 2002 07:46:33 GMT NNTP-Posting-Host: 144.132.91.90 X-Complaints-To: news@bigpond.net.au X-Trace: news-server.bigpond.net.au 1012981593 144.132.91.90 (Wed, 06 Feb 2002 18:46:33 EST) NNTP-Posting-Date: Wed, 06 Feb 2002 18:46:33 EST Xref: archiver1.google.com comp.lang.ada:19660 Date: 2002-02-06T07:46:33+00:00 List-Id: Steve Doiel wrote: > In the main procedure of your program, before entering glutMainLoop save off > the task ID of the environment task. > > env_task_id := Ada.Task_Identification.Current_Task; > > When you want to kill the program call: > > Ada.Task_Identification.Abort_Task( env_task_id ); > > When you kill the environment task, all subordinate tasks are terminated as > well. > > With GNAT 3.14p, I get the message: > Execution terminated by abort of environment task > > On the console window of my test program. Well, i'm not sure that would work. What if one of the tasks is a library level task, i.e. declared and elaborated in a library level package? I'm not sure that there is a "parent" task in that case. Dale