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,43da1b63a7c8cf39 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-26 02:00:14 PST Path: archiver1.google.com!news1.google.com!news.glorb.com!newsgate.cistron.nl!news.tele.dk!news.tele.dk!small.news.tele.dk!news-fra1.dfn.de!news-nue1.dfn.de!newsfeed.r-kom.de!news.m-online.net!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: Signal handler blocks proteced type Date: Fri, 26 Mar 2004 10:00:13 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1080295213 26359 217.17.192.37 (26 Mar 2004 10:00:13 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Fri, 26 Mar 2004 10:00:13 +0000 (UTC) User-Agent: slrn/0.9.8.0 (Linux) Xref: archiver1.google.com comp.lang.ada:6546 Date: 2004-03-26T10:00:13+00:00 List-Id: * Lutz Donnerhacke wrote: > A protected type with a signal handler is instantiated in order to catch a > signal. If the signal is not catched, everything works fine. If the signal > was delivered, the inner scope will not be terminated, because the protected > type can not be finalized. > > Why? Ada.Interrupts.Detach_Handler is broken. It does not return if the signal was delivered. Changing the example to 'pragma Interrupt_Handler' and an explicit Attach_Handler works fine (termination of the enviroment task succeeds). Any call to Detach_Handler after a signal delivery results in a blocking runtime call. select delay 2.0; else abort Detach_Handler(SIGHUP); end select; does not work. Even an Abort_Task call from an other task has no effect. The runtime (Linux-Threads) seems to miss an SIGCHILD and waits forever for the wrong clone.