mailing list of musl libc
 help / color / mirror / code / Atom feed
From: "Королев Сергей" <korolev.sergey@gmail.com>
To: musl@lists.openwall.com
Subject: Re: do_tzset() prevents reusing the same name of a timezone file
Date: Sun, 19 Oct 2014 11:26:08 +0400	[thread overview]
Message-ID: <CA+QjRnJmr1oReKFeBjeNjoqCzXCaF+xsbjAYe3t9oeBr3H8WRw@mail.gmail.com> (raw)
In-Reply-To: <20141019022056.GJ32028@brightrain.aerifal.cx>

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

I have a symlink "/etc/localtime -> /var/TZ". Only "/var/TZ" contents
modified for timezone changing but "TZ=/etc/localtime" variable (set in the
init process) always stays the same.

The constant TZ pointing to the symlink used to apply timezone settings for
all active processes in the system on the fly. This needs for proper
logging with the syslog.

2014-10-19 6:20 GMT+04:00 Rich Felker <dalias@libc.org>:

> On Sat, Oct 18, 2014 at 12:20:05AM +0400, Королев Сергей wrote:
> > Hi, all.
> >
> > I have a question about do_tzset() function implementation (musl v1.1.5).
> > The function has the following conditions to prevent timezone file
> remapping
> >
> > if (old_tz && !strcmp(s, old_tz)) return;
>
> All this line does is prevent any reloading if the TZ variable has not
> changed since do_tzset() was last called.
>
> > which do not allow to use "TZ" environment variable pointing to the same
> > file (e.g. /etc/localtime). But some distros replace this file directly
> or
> > use it as a symlink.
> >
> > Is this limitation a bug or a feature?
>
> Can you clarify what problem you're actually experiencing?
> /etc/localtime is currently supported/used if TZ is unset or set to
> the empty string.
>
> Rich
>

[-- Attachment #2: Type: text/html, Size: 1802 bytes --]

  reply	other threads:[~2014-10-19  7:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-17 20:20 Королев Сергей
2014-10-19  2:20 ` Rich Felker
2014-10-19  7:26   ` Королев Сергей [this message]
2014-10-19  9:36     ` u-wsnj
2014-10-19 10:00       ` Timo Teras
2014-10-19 17:33         ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+QjRnJmr1oReKFeBjeNjoqCzXCaF+xsbjAYe3t9oeBr3H8WRw@mail.gmail.com \
    --to=korolev.sergey@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).