delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/30/11:23:39

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4B13CB3A.7070909@alice.it>
References: <4B13CB3A DOT 7070909 AT alice DOT it>
Date: Mon, 30 Nov 2009 11:23:23 -0500
Message-ID: <a13b5a590911300823g7d05e820g4bfb6918098cc6ab@mail.gmail.com>
Subject: Re: [ANNOUNCEMENT] [1.7] Updated: cygwin-1.7.0-67
From: Robert Pendell <shinji AT elite-systems DOT org>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Mon, Nov 30, 2009 at 8:40 AM, Angelo Graziosi wrote:
> Ken Brown wrote:
>>
>> Nevertheless, it's somewhat startling to see permissions change as a side
>> effect of patching a file. One simple way to prevent this is to unset TMP
>> and TEMP in /etc/profile. Is there any downside to doing this? A search of
>> the mailing list archives shows that the default /etc/profile used to do
>> this. I didn't dig long enough to find out why it changed.
>
> For the moment, I have added 'export TMP=/tmp' to .bashrc, which works.
> Alternatively, on should use 'TMP=/tmp patch...'
>
>
> Ciao,
> Angelo.
>

I guess a side question here is if TMP does not exist then should it
be defaulting to the system wide TEMP variable, the one defined in
.bashrc for the user or should it even be created at all?  I posted an
strace and it shows TEMP set to /tmp but patch still uses TMP instead
and since TMP doesn't exist it looks like cygwin sets TMP to the
system wide one by default.  On linux patch uses whatever TEMP is set
to and doesn't use TMP if it isn't set.  If I set TMP then it uses
that instead so it has an obvious preference to it.

The linux distribution was Debian or a close derivative.  I don't
maintain the server I tested on.

P.S. - On linux (when I tested) TEMP, TMP, and TMPDIR were not set and
patch defaulted to /tmp.


Robert Pendell
shinji AT elite-systems DOT org
CAcert Assurer
"A perfect world is one of chaos."

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019