Re: [exim] Re: Bug#283538: exim4: perl calls setlocale() beh…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Andreas Metzler
CC: exim-users, 283538-forwarded
Sujet: Re: [exim] Re: Bug#283538: exim4: perl calls setlocale() behind exim's back
On Mon, 29 Nov 2004, Andreas Metzler wrote:

> This is <http://bugs.debian.org/283538>.
> On 2004-11-29 Marcin Owsiany <porridge@???> wrote:
> > Package: exim4
> [...]
> > Basically:
>
> > $ LANG=pl_PL sudo exim4 -be
> > > ${tod_full}
> > Mon, 29 Nov 2004 19:16:49 +0100
> > > ${perl{whatever}}
> > Failed: Undefined subroutine &main::whatever called.
>
> > > ${tod_full}
> > pon, 29 lis 2004 19:17:12 +0100
> > >
> > $
>
> > That causes exim to produce invalid Received: headers afterwards.
> [...]
>
> The bugreport itself was produced with 4.34, but I've verified this
> with 4.43.


Sigh. When Exim starts up, it obeys this:

/* The C standard says that the equivalent of setlocale(LC_ALL, "C") is obeyed
at the start of a program; however, it seems that some environments do not
follow this. A "strange" locale can affect the formatting of timestamps, so we
make quite sure. */

setlocale(LC_ALL, "C");

Looks like it needs to re-do that call on the return from Perl...


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book