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,f94e9bacae9613b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-29 13:55:09 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.cs.ubc.ca!logbridge.uoregon.edu!arclight.uoregon.edu!newsfeed.mathworks.com!cyclone.swbell.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3E384D9E.73123184@raytheon.com> From: Mark Johnson X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: tasking programs built with GNAT insensitive to SIGTERM References: <6a6390b8.0301290704.7880bb16@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 29 Jan 2003 15:54:38 -0600 NNTP-Posting-Host: 192.27.48.39 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1043877307 192.27.48.39 (Wed, 29 Jan 2003 15:55:07 CST) NNTP-Posting-Date: Wed, 29 Jan 2003 15:55:07 CST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:33582 Date: 2003-01-29T15:54:38-06:00 List-Id: Oliver Kellogg wrote: > > Hi, > > Under Linux, how come tasking programs built with GNAT > (3.2, but other versions as well) don't react to > "kill -TERM" ? > > Is there a trick to make them killable? > > See also http://gcc.gnu.org/cgi-bin/gnatsweb.pl, > bug number 9480. > Hmm. Very odd behavior. You can probably get what you want by using pragma Interrupt_State (SIGTERM, System); Which forces SIGTERM to be handled as a "system" interrupt. See the GNAT Reference Manual for more details. I ran a test program and it appears to do what you want it to. It is odd enough - I may forward it to ACT to see what they say about it. Also note - you DO have to hit one of the threads that has that signal enabled to make it terminate the program. The main program is OK (usually the process with the lowest PID), but the thread manager (usually main PID +1) has the signal masked. --Mark