Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: deadlock caused by gettext usage in a signal handler



On Mon, Dec 03, 2007 at 10:43:24PM +0000, Peter Stephenson wrote:
> On Fri, 30 Nov 2007 20:35:34 +0100
> Guillaume Chazarain <guichaz@xxxxxxxx> 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.



Messages sorted by: Reverse Date, Date, Thread, Author