From owner-freebsd-current@FreeBSD.ORG Tue Nov 11 08:57:08 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6AAAE54; Tue, 11 Nov 2014 08:57:08 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B769FA98; Tue, 11 Nov 2014 08:57:07 +0000 (UTC) Received: from [192.168.0.106] (cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52]) (authenticated bits=0) by theravensnest.org (8.14.9/8.14.9) with ESMTP id sAB8urfb038479 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 11 Nov 2014 08:56:56 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52] claimed to be [192.168.0.106] Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Changing timezone without reboot/restarting each service? From: David Chisnall In-Reply-To: <5461841F.9080208@freebsd.org> Date: Tue, 11 Nov 2014 08:56:47 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <96024C48-850E-4511-94E5-C39E5A8AA77F@FreeBSD.org> References: <5460B143.3010004@FreeBSD.org> <1415676518.1517572.189478341.09FB6AE5@webmail.messagingengine.com> <5461841F.9080208@freebsd.org> To: Allan Jude X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2014 08:57:09 -0000 On 11 Nov 2014, at 03:35, Allan Jude wrote: > jkh@ mentioned this specifically when he gave his talk at EuroBSDCon = and > MeetBSD, about how Apple solved this in LaunchD, because apparently > originally libc DID check /etc/localtime constantly. Darwin also has the notify(3) interface, which allows one-bit messages = to be transmitted either from the kernel to userspace or from userspace = to userspace very cheaply. This is ideal for this sort of 'something = you've cached is change, go and do something expensive to fix it' use = (time zone has changed, network connectivity has changed, power state = has changed). You can assign notifications to either file descriptors = (that can be monitored with kqueue), to signals, or to flags in memory = for things where polling is cheaper (as in this case - the libc = functions could just check whether a specific flag is set in memory when = accessing the time zone info and load a newer one if changed). David