Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 12917 invoked from network); 22 Sep 2009 16:05:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Sep 2009 16:05:51 -0000 Received: (qmail 58091 invoked by uid 500); 22 Sep 2009 16:05:50 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 57954 invoked by uid 500); 22 Sep 2009 16:05:50 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 57944 invoked by uid 99); 22 Sep 2009 16:05:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2009 16:05:50 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 76.96.59.211 is neither permitted nor denied by domain of jim@jagunet.com) Received: from [76.96.59.211] (HELO QMTA11.westchester.pa.mail.comcast.net) (76.96.59.211) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2009 16:05:39 +0000 Received: from OMTA02.westchester.pa.mail.comcast.net ([76.96.62.19]) by QMTA11.westchester.pa.mail.comcast.net with comcast id jrza1c0090QuhwU5Bs5Kf8; Tue, 22 Sep 2009 16:05:19 +0000 Received: from [192.168.199.10] ([69.251.84.64]) by OMTA02.westchester.pa.mail.comcast.net with comcast id js5D1c00B1PGofZ3Ns5HbE; Tue, 22 Sep 2009 16:05:19 +0000 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1076) Subject: Re: svn commit: r817291 - /commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/util/Utils.java From: Jim Jagielski In-Reply-To: <4F65E413-FD4C-4FCB-8E98-E1E9156911E6@jagunet.com> Date: Tue, 22 Sep 2009 12:05:10 -0400 Content-Transfer-Encoding: 7bit Message-Id: References: <20090921153422.2D88623888CC@eris.apache.org> <977B0EAA-3091-412E-88E9-65DEB9293E74@jaguNET.com> <95271795-B4F8-4131-977B-939D7D1EB6C0@jaguNET.com> <4AB8E5AF.7020100@apache.org> <4F65E413-FD4C-4FCB-8E98-E1E9156911E6@jagunet.com> To: "Commons Developers List" X-Mailer: Apple Mail (2.1076) X-Virus-Checked: Checked by ClamAV on apache.org On Sep 22, 2009, at 11:51 AM, Jim Jagielski wrote: > > On Sep 22, 2009, at 10:56 AM, Mladen Turk wrote: > >> On 22/09/09 16:06, Jim Jagielski wrote: >>> >>> On Sep 21, 2009, at 11:51 AM, Jim Jagielski wrote: >>> >>>> >>>> On Sep 21, 2009, at 11:34 AM, mturk@apache.org wrote: >>>>> >>>>> + private static final String [] try_envs = { >>>>> + "TMP", >>>>> + "TEMP", >>>>> + "TMPDIR", >>>>> + "TEMPDIR" >>>>> + }; >>>> >>>> Not sure about that ordering, unless we want to favor Windows. >>>> For Unix the canonical envvar is TMPDIR, so it should likely be >>>> checked 1st (and this the 1st element), and then go down the >>>> others... >>>> >>>> Of course, we could even get more sophisticated and have 2; one for >>>> Windows and another for non-Windows, so the ordering makes more >>>> sense >>>> depending on the platform ;) >>>> >>>> OK if I fold something like that in? >>>> >>> >>> Didn't hear back, so I'll be conservative and not do so... >>> >> >> It's just like with APR. See unix/tempdir.c >> The order is: TMP, TEMP, TMPDIR (and I added TEMPDIR) > > which itself was based on Python 2.2 (earlier used TMPFILE) :) FWIW, later versions of Python use "my" ordering: # First, try the environment. for envname in 'TMPDIR', 'TEMP', 'TMP': dirname = _os.getenv(envname) if dirname: dirlist.append(dirname) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org