NLS/strerror efficiency

Gabor Kovesdan gabor at FreeBSD.org
Sun Jan 24 10:58:15 UTC 2010


El 2010. 01. 24. 10:19, Peter Jeremy escribió:
> I think this is a good start but still needs some work.  One issue is
> that the patch mixes whitespace changes (some not complying with
> style(9)) and functional changes.  This makes it harder to see the
> functional changes.
>    
I thought fixing up some style(9) nits was ok but I meant them to be 
compliant with style(9). Could you please point out, which are not 
compliant? Shall I revert the style(9) changes for now?
> How much of an issue is this in reality?  There are two cases to
> consider:
> 1) A process that dynamically changes its locale.
> 2) Locale files being updated whilst the process is running.
>
> The first can be worked around by also caching the current locale
> and checking that it hasn't changed.
>    
I'll fix up my patch to do that.
> The second is more problematic - particularly for long-running
> programs.  Maybe add a timestamp and re-check every minute or 5.
>    
I agree, that it should track changing catalogs but do we really want 
that? Catalogs are usually bundled with third-party apps and if you 
update something you obviously want to restart that. And in the case of 
strerror(3), catalogs are supposed to be updated with libc and when you 
update libc you probably want to restart everything.

-- 
Gabor Kovesdan
FreeBSD Volunteer

EMAIL: gabor at FreeBSD.org .:|:. gabor at kovesdan.org
WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org



More information about the freebsd-current mailing list