Date: Mon, 24 Sep 2012 09:45:22 -0700 From: Devin Teske <devin.teske@fisglobal.com> To: Doug Barton <dougb@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Devin Teske <dteske@FreeBSD.org>, src-committers@freebsd.org Subject: Re: svn commit: r240843 - head/usr.sbin/bsdconfig/timezone/share Message-ID: <FE6A261F-D5B9-4767-AAB0-8B01E45421DE@fisglobal.com> In-Reply-To: <505FCFED.2000101@FreeBSD.org> References: <201209222216.q8MMG7w2053948@svn.freebsd.org> <505FCFED.2000101@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FE6A261F-D5B9-4767-AAB0-8B01E45421DE>