From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22037 invoked from network); 4 Dec 2007 23:43:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 4 Dec 2007 23:43:26 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 26052 invoked from network); 4 Dec 2007 19:43:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Dec 2007 19:43:23 -0000 Received: (qmail 25527 invoked by alias); 4 Dec 2007 19:43:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24156 Received: (qmail 25507 invoked from network); 4 Dec 2007 19:43:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Dec 2007 19:43:19 -0000 Received: (qmail 25838 invoked from network); 4 Dec 2007 19:43:19 -0000 Received: from mtaout01-winn.ispmail.ntl.com (81.103.221.47) by a.mx.sunsite.dk with SMTP; 4 Dec 2007 19:43:13 -0000 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout01-winn.ispmail.ntl.com with ESMTP id <20071204194332.CVUG1988.mtaout01-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Tue, 4 Dec 2007 19:43:32 +0000 Received: from pws-pc.ntlworld.com ([82.6.96.116]) by aamtaout02-winn.ispmail.ntl.com with SMTP id <20071204194328.DCMX17393.aamtaout02-winn.ispmail.ntl.com@pws-pc.ntlworld.com>; Tue, 4 Dec 2007 19:43:28 +0000 Date: Tue, 4 Dec 2007 19:43:09 +0000 From: Peter Stephenson To: Guillaume Chazarain , Zsh Hackers' List Subject: Re: deadlock caused by gettext usage in a signal handler Message-Id: <20071204194309.7ca3e250.p.w.stephenson@ntlworld.com> In-Reply-To: <20071204194314.136c08ad@inria.fr> References: <20071130203534.1d1ea29c@inria.fr> <20071203224324.247fb30f.p.w.stephenson@ntlworld.com> <20071204190219.037a5400@inria.fr> <200712041824.lB4IOowf006457@news01.csr.com> <20071204194314.136c08ad@inria.fr> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 4 Dec 2007 19:43:14 +0100 Guillaume Chazarain wrote: > > > strerror_r also calls into gettext, so I don't see how this solves the > > > problem. > > > > strerror_r() is the way of ensuring thread safety in printing the > > message by providing a buffer into which data is written. The GNU > > library manual entry does actually claim it's thread-safe; that > > means that any hidden back-end functions it uses are thread-safe too. > > Thread-safety does not imply async-signal-safety. It means locks and > thread local storage, but these do nothing for signals. It would be > great if sticking an _r would make functions callable in signal > handlers ;-) Indeed, it's as you say. So the patch doesn't really help, since that's the only case we have to worry about. I don't see an easy way out at the moment. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/