This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix multiple minor tzset glitches [BZ #24004]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 14 Mar 2019 15:10:57 +0100
- Subject: Re: [PATCH] Fix multiple minor tzset glitches [BZ #24004]
- References: <20190211163728.31655-1-eggert@cs.ucla.edu> <87h8d1e8tk.fsf@oldenburg2.str.redhat.com> <9f3882f6-e056-95d1-4506-58fd87cbf6c2@cs.ucla.edu> <87d0muesi3.fsf@oldenburg2.str.redhat.com> <4d46da6e-6901-f736-f573-3dfbef27a3df@cs.ucla.edu>
* Paul Eggert:
> On 3/13/19 7:52 AM, Florian Weimer wrote:
>> On the other hand, for files which we do not poll for changes (such as
>> /etc/resolv.conf previously, and /etc/gai.conf and /etc/nsswitch.conf
>> presently), we regularly receive requests to add such polling.
>
> Yes, and it would be good to add a way to control polling of /etc files,
> and whatever method is used to control polling of /etc/nsswitch.conf
> etc. could also be used to control polling of /etc/localtime. Still, the
> current situation with /etc/localtime is not good: it disagrees with the
> documentation and with common practice elsewhere. So I suggest that we
> fix it and also look into adding an API to control polling.
>
> One API might be something like a new include file etcpoll.h with an API
> like this:
>
> etcpoll (ETC_NSSWITCH_CONF, ETCPOLL_NOW);
> etcpoll (ETC_GAI_CONF, ETCPOLL_ALWAYS);
> etcpoll (ETC_LOCALTIME, ETCPOLL_DISABLE);
>
> where NOW means reconsult the file now, ALWAYS means always reconsult
> the file before every use of its data, and DISABLE means stop
> reconsulting. That sort of thing.
I think this should be a configuration file. We can use a shared
mapping (or use /etc/ld.so.cache) to make up-to-date checks really,
really cheap. But I think we should apply this mechanism only to files
where the system administrator has enabled this feature.
Thanks,
Florian