This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


* Paul Eggert:

> On 2/18/19 1:37 AM, Florian Weimer wrote:
>> I thought this polling (for reloading /etc/localtime if it has changed)
>> was a feature.  I'm not sure if we can remove it.
>
> No such polling is documented. On the contrary, the glibc manual says
> that an unset TZ is treated as if it were set to
> ':/etc/localtime'. There is no polling when you set
> TZ=':/etc/localtime' (or to TZ='/etc/localtime', or to any other
> value). So the code and the documentation disagree, and one or the
> other needs to be fixed.
>
> Neither Solaris nor OpenBSD poll, so portable programs cannot assume
> that polling occurs. (These are the only two other systems I checked.)
>
> Commentary like this:
>
> https://blog.packagecloud.io/eng/2017/02/21/set-environment-variable-save-thousands-of-system-calls/
>
> says that polling is a bad idea, and gives TZ=':/etc/localtime' as a
> workaround for glibc. I'm sympathetic, as the polling makes glibc look
> bad compared to the competition.

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.  For
nsswitch.conf, this is clearly documented in the manual page, and yet
people still ask for it.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]