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

Re: LC_ALL=C foo, where foo is a shell function



[moved to -workers]

On Sat, Apr 14, 2007 at 01:18:31PM -0700, Bart Schaefer wrote:
> I'm not able to reproduce it with the latest CVS on my RHEL4 machine, or
> at least I can't do so with the most straightforward interpretation of
> "LC_ALL starts out set".
> 
> If it is happening, it has to be related to this (params.c):
> 
>     void
>     lc_allsetfn(Param pm, char *x)
>     {
> 	strsetfn(pm, x);
> 	if (!x) {
> 	    queue_signals();
> 	    setlang(getsparam("LANG"));
> 	    unqueue_signals();
> 	}
> 	else
> 	    setlocale(LC_ALL, x);
>     }

I just tried and succeeded in reproducing the problem again.  So the
issue is that setlocale() is exporting LC_ALL, but at no point is the
shell aware of this?



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