From owner-freebsd-questions@FreeBSD.ORG Tue Mar 16 15:23:23 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88AB5106566B for ; Tue, 16 Mar 2010 15:23:23 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from server505.appriver.com (server505a.appriver.com [98.129.35.4]) by mx1.freebsd.org (Postfix) with ESMTP id 503298FC0A for ; Tue, 16 Mar 2010 15:23:22 +0000 (UTC) X-Policy: GLOBAL - maxiscale.com X-Primary: psteele@maxiscale.com X-Note: This Email was scanned by AppRiver SecureTide X-ALLOW: psteele@maxiscale.com ALLOWED X-Virus-Scan: V- X-Note: Spam Tests Failed: X-Country-Path: UNITED STATES->UNITED STATES->UNITED STATES X-Note-Sending-IP: 98.129.23.15 X-Note-Reverse-DNS: ht02.exg5.exghost.com X-Note-WHTLIST: psteele@maxiscale.com X-Note: User Rule Hits: X-Note: Global Rule Hits: G179 G180 G181 G182 G186 G187 G198 G285 X-Note: Encrypt Rule Hits: X-Note: Mail Class: ALLOWEDSENDER X-Note: Headers Injected Received: from [98.129.23.15] (HELO ht02.exg5.exghost.com) by server505.appriver.com (CommuniGate Pro SMTP 5.3.2) with ESMTPS id 32457784 for freebsd-questions@freebsd.org; Tue, 16 Mar 2010 10:23:23 -0500 Received: from mbx03.exg5.exghost.com ([169.254.1.132]) by ht02.exg5.exghost.com ([98.129.23.15]) with mapi; Tue, 16 Mar 2010 10:23:21 -0500 From: Peter Steele To: "freebsd-questions@freebsd.org" Date: Tue, 16 Mar 2010 10:23:20 -0500 Thread-Topic: How to make a process detect time zone change? Thread-Index: AcrFHJwoLq8V6kn1RyaplxBtHmj+jg== Message-ID: <7B9397B189EB6E46A5EE7B4C8A4BB7CB3B27D7F5@MBX03.exg5.exghost.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How to make a process detect time zone change? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2010 15:23:23 -0000 We have a system controlled through a Java GUI and one of the commands prov= ided in the GUI is to change the date/time, including the time zone. When t= he time zone is changed the FreeBSD system immediately recognizes the chang= e (that is, the date command from the command line shows the correct time a= nd time zone). However, our running C apps do not recognize that a time zon= e change has occurred unless they are restarted. What's the proper way to i= nform an active process that a time zone change has occurred? I've tried tz= set() and tzsetwall() but neither seem to do the trick. The only thing I've= found that works is to restart the process, and that's not really a soluti= on.