[PATCH] Fix multiple minor tzset glitches [BZ #24004]

Florian Weimer fweimer@redhat.com
Thu Mar 14 14:11:00 GMT 2019


* 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



More information about the Libc-alpha mailing list