From owner-svn-src-all@FreeBSD.ORG Mon Sep 24 16:45:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70575106566B; Mon, 24 Sep 2012 16:45:40 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 33A358FC08; Mon, 24 Sep 2012 16:45:40 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.15]) by ltcfislmsgpa04.fnfis.com (8.14.4/8.14.4) with ESMTP id q8OGiWKo001044 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 24 Sep 2012 11:45:32 -0500 Received: from [10.0.0.100] (10.14.152.61) by smtp.fisglobal.com (10.132.206.15) with Microsoft SMTP Server (TLS) id 14.2.309.2; Mon, 24 Sep 2012 11:45:24 -0500 MIME-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset="iso-8859-1" From: Devin Teske In-Reply-To: <505FCFED.2000101@FreeBSD.org> Date: Mon, 24 Sep 2012 09:45:22 -0700 Content-Transfer-Encoding: quoted-printable Message-ID: References: <201209222216.q8MMG7w2053948@svn.freebsd.org> <505FCFED.2000101@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1278) X-Originating-IP: [10.14.152.61] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-09-24_04:2012-09-24, 2012-09-24, 1970-01-01 signatures=0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Devin Teske , src-committers@freebsd.org Subject: Re: svn commit: r240843 - head/usr.sbin/bsdconfig/timezone/share X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Devin Teske List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2012 16:45:40 -0000 On Sep 23, 2012, at 8:13 PM, Doug Barton wrote: > On 09/22/2012 15:16, Devin Teske wrote: >> - if : 2> /dev/null > "$_PATH_DB"; then >> + if true 2> /dev/null > "$_PATH_DB"; then >> cat <<-EOF > "$_PATH_DB" >> $zoneinfo >> EOF >=20 > Is there a reason you're not using mktemp here? >=20 Hi Doug, There is indeed a reason that mktemp is not used in this situation. 1. No possibility of a race condition, so little-to-no need for mktemp. 2. Using mktemp in a "file-truncate operation" would just be "wrong" (quoti= ng others). --=20 Devin P.S. I posited your question to IRC to see what general consensus was and m= any agreed that mktemp is not right in this situation. _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.