www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/10/06/18:12:03

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4CACF424.8050009@bopp.net>
Date: Wed, 06 Oct 2010 17:11:48 -0500
From: Jeremy Bopp <jeremy AT bopp DOT net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: In what way is /cygdrive special WRT to permissions?
References: <9872BD92701C494686D002F1620610D0 AT ahallpc> <20101006084740 DOT GS5480 AT calimero DOT vinschen DOT de> <5F51089A175A41AC8A69F08E6335F64C AT ahallpc> <20101006204250 DOT GB5480 AT calimero DOT vinschen DOT de> <356FBB512633488981F699EB2A150831 AT ahallpc>
In-Reply-To: <356FBB512633488981F699EB2A150831@ahallpc>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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 10/6/2010 4:38 PM, Andy Hall wrote:
> There is no doubt that this behavior changed from 1.5 to 1.7.  The instant I
> upgraded from 1.5 to 1.7.7,  build scripts that test for the abilty to write
> to the directories in F: instantly started reporting the directories were
> not writeable using test -w, yet you can still create and write files via
> Cygwin.  

<snip>

> The explict mounting of //vega/repository is the workaround I eventually
> settled on.

At the risk of taking this thread a little off topic, why do your build
scripts explicitly check for write access to these directories?  I agree
that it would be good to keep this working in order to maintain
compatibility with older Cygwin releases, but the build scripts we use
where I work don't bother to check for access to things before using
them.  They just assume that they have the necessary access and then
fail with an explicit error when those assumptions are faulty.

I also always considered the check before you use methodology to be a
bit risky to begin with.  The reason being that between the time you
check for access and the time you try to actually use that access
another process could remove the access or even the entire resource.  At
that point you fail as if you never bothered to check for access in the
first place, so your logic had better be able to deal with that somehow.
 If you're going to have logic to handle failed access attempts, you may
as well abandon the access checks. :-)

-Jeremy

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