From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4527 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: syslog() always sends GMT timestamps Date: Wed, 29 Jan 2014 23:33:44 -0500 Message-ID: <20140130043344.GR24286@brightrain.aerifal.cx> References: <500a674a-fd43-49f5-99b8-6fd0b18ef5a2@email.android.com> <20140128171153.GL24286@brightrain.aerifal.cx> <770108a1-99d7-4ef0-b860-b045866c9895@email.android.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1391056432 16151 80.91.229.3 (30 Jan 2014 04:33:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jan 2014 04:33:52 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4531-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 30 05:34:00 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1W8jKA-00034t-Jy for gllmg-musl@plane.gmane.org; Thu, 30 Jan 2014 05:33:58 +0100 Original-Received: (qmail 11586 invoked by uid 550); 30 Jan 2014 04:33:57 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 11578 invoked from network); 30 Jan 2014 04:33:57 -0000 Content-Disposition: inline In-Reply-To: <770108a1-99d7-4ef0-b860-b045866c9895@email.android.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4527 Archived-At: On Wed, Jan 29, 2014 at 07:45:25PM +0800, orc wrote: > Thank you for your detailed explanation about cross-process and > cross-user issues. Since my systems are probably not going to be > true multi-user interconnected and sharing resources (say, for > example, sending logs to central syslog server), I want to keep > "old" behavior of syslog(). Can you give advices how I can do that > in more safe way? If it is not possible, what breakage can occur if > I will go with localtime_r()? > Thanks! Really it's unlikely to break anything if you just use localtime_r, but the behavior is testably/observably incorrect per the standard and could interact badly with multithreaded programs which change their own environments at runtime (note that the same breakage probably occurs on glibc and elsewhere though; musl just tries to be better than that). So really this is a matter you could pretty easily change locally, but where for correctness and robustness the change isn't acceptable upstream. If you (or others) still have interest in trying to get syslog with local time upstream, we'll need to have a discussion on how it could be done safely. Rich