From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22961 invoked from network); 4 Dec 2007 01:39:49 -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.5 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 01:39:49 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 37778 invoked from network); 4 Dec 2007 01:39:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 4 Dec 2007 01:39:42 -0000 Received: (qmail 2106 invoked by alias); 4 Dec 2007 01:39:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24149 Received: (qmail 2090 invoked from network); 4 Dec 2007 01:39:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 4 Dec 2007 01:39:37 -0000 Received: (qmail 37464 invoked from network); 4 Dec 2007 01:39:37 -0000 Received: from mx.freeshell.org (HELO sdf.lonestar.org) (192.94.73.19) by a.mx.sunsite.dk with SMTP; 4 Dec 2007 01:39:30 -0000 Received: from sdf.lonestar.org (IDENT:pda@sverige.freeshell.org [192.94.73.4]) by sdf.lonestar.org (8.14.1/8.13.8) with ESMTP id lB41dNpZ002993 for ; Tue, 4 Dec 2007 01:39:23 GMT Received: (from pda@localhost) by sdf.lonestar.org (8.14.1/8.12.8/Submit) id lB41dMas017123 for zsh-workers@sunsite.dk; Tue, 4 Dec 2007 01:39:22 GMT From: Paul Ackersviller Date: Tue, 4 Dec 2007 01:39:22 +0000 To: zsh-workers@sunsite.dk Subject: Re: deadlock caused by gettext usage in a signal handler Message-ID: <20071204013922.GF18254@sverige> Mail-Followup-To: zsh-workers@sunsite.dk References: <20071130203534.1d1ea29c@inria.fr> <20071203224324.247fb30f.p.w.stephenson@ntlworld.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071203224324.247fb30f.p.w.stephenson@ntlworld.com> User-Agent: Mutt/1.4.2.3i On Mon, Dec 03, 2007 at 10:43:24PM +0000, Peter Stephenson wrote: > On Fri, 30 Nov 2007 20:35:34 +0100 > Guillaume Chazarain wrote: > > I just had a Zsh process (using zsh-4.2.6-6.fc7) deadlock, the > > backtrace seems to show it is initializing the gettext infrastructure > > to print "Input/output error" in a signal handler. ...most of patch snipped for conciseness... > - fputs(strerror(num), file); > + fputs(errmsg, file); > else { > - char *errmsg = strerror(num); > fputc(tulower(errmsg[0]), file); > fputs(errmsg + 1, file); As this was reported on 4.2.6, I figured you'd want it on the 4.2 branch as well. However the entire patch doesn't merge cleanly, due to zerrmsg having its signature changed in 4.3 (with a FILE pointer as the first parameter). It seemed obvious enough to change `file' in the above hunk to `stderr', so I've committed that to the zsh-4_2-patches branch.