Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Mon, 18 Aug 2003 17:59:27 -0400
From: "Pierre A. Humblet" <pierre.humblet@ieee.org>
To: cygwin@cygwin.com
Subject: Re: -x weirdness
Message-ID: <20030818215927.GA371185@Worldnet>
References: <16193.14627.802702.855384@scicily.montreal.ad-opt.com> <197-1578450001.20030818232842@familiehaase.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <197-1578450001.20030818232842@familiehaase.de>
User-Agent: Mutt/1.4i

On Mon, Aug 18, 2003 at 11:28:42PM +0200, Gerrit P. Haase wrote:
> 
> Nope. Seems to be a bug in your perl version.  Which version are you
> using right now?  I consider the 5.8.0 series will be removed from the
> mirrors soon, I was not very happy with it.  5.6.1-2 will stay and
> eventually be updated to use cygwin-1.5.2 and probably also some day
> in future there will be a 5.6.2 release, I'll look into this issue if
> it is a bug in 5.6.x, and my 5.8.1-tobe snapshot with cygwin 1.5.2
> does it the correct way: 
> 
> $ perl -e 'print -x "/usr/bin/bash" ? 0 : 1 , "\n"'
> 0
> $ perl -e 'print -x "/usr/bin/bash.exe" ? 0 : 1 , "\n"'
> 0
> $ perl -v
> 
> This is perl, v5.8.1 built for cygwin-multi-64int
> (with 1 registered patch, see perl -V for more detail)
> ...
Gerritt,

FWIW, your test above is not conclusive (which doesn't mean
that your 5.8.1-tobe is incorrect).
You need to setup a situation as described by Benoit
where ls -l appears to show that the file isn't executable
although it really is. Using the access function is the way
to go.

This is what I observe (with perl from setup)

$ perl -v
This is perl, v5.8.0 built for cygwin-multi-64int
$ perl -e 'print -x "/usr/bin/bash" ? 0 : 1 , "\n"'
1
$ [ -x /usr/bin/bash ]; echo $?
0

Pierre



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

