X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4B151652.9080107@cornell.edu> References: <4B14573C DOT 3040409 AT alice DOT it> <20091201091515 DOT GC30043 AT calimero DOT vinschen DOT de> <4B151652 DOT 9080107 AT cornell DOT edu> Date: Tue, 1 Dec 2009 13:34:22 +0000 Message-ID: <416096c60912010534k2032ded3v974474054ab1c3d4@mail.gmail.com> Subject: Re: Unset TMP/TEMP in profile? (was Re: [ANNOUNCEMENT] [1.7] Updated: cygwin-1.7.0-67) From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 2009/12/1 Ken Brown: > On 12/1/2009 5:44 AM, John Morrison wrote: >> Unsetting them in the skel .bashrc files shouldn't be a problem to do, b= ut >> on my system... >> >> $ echo $TMP >> /cygdrive/c/DOCUME~1/morrijr/LOCALS~1/Temp >> >> Tue Dec 01 10:40 AM >> $ unset TMP >> >> Tue Dec 01 10:40 AM >> $ echo $TMP >> >> >> Tue Dec 01 10:40 AM >> $ >> >> They don't get 'reset' to the windows default... but then, I've not real= ly >> been following this thread. =C2=A0Is that what's wanted? > > No, they're not expected to get reset. > >> Also, $PATCH and $TMPDIR weren't defined on my system anyway... > > The discussion about "patch" referred to the program /usr/bin/patch, not = to > an environment variable. > > TMPDIR is apparently not defined by default in the Windows environment, so > it will usually be undefined unless the user has defined it. =C2=A0I thin= k it > should therefore be left alone. > > The proposal, then, is simply to unset TMP and TEMP in the skel .bashrc > file. =C2=A0There should be some sort of comment for the sake of users wh= o want > those variables to be set for whatever reason. =C2=A0Here's one possibili= ty, but > it may be a little too verbose: > > # TMP and TEMP are defined in the Windows environment. =C2=A0Leaving > # them set to the default Windows temporary directory can have > # unexpected consequences. > unset TMP > unset TEMP > > # Alternatively, set them to the Cygwin temporary directory > # export TMP=3D/tmp > # export TEMP=3D/tmp > > # Or use TMPDIR instead > # export TMPDIR=3D/tmp If the ability to get back to the Windows settings is considered important, TMP and TEMP could be saved to other variables before unsetting or changing them, for example: export WTMP=3D"$TMP" export WTEMP=3D"$TEMP" Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple