delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/03/20/14:55:54

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=hkS0+FRZ/X1l1PSu
6MxUZcZNLkPl/SjblrLhpLWDvax5kzCWTQWnVLQB/RzFU7MFYuqMNKhI8Lst2sZP
FdMY8oJsc7MfD2ati5RpQEY3Vm6yMK86GYKAdJL2P7SqY7hC2T3HqfgMaabfSU+g
Da2j5ED0DkF5WooVgkVsHhbu9do=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=fFAB1LVlAUMoYTeOoE82YK
ouARE=; b=IX+G/7zyMKtcewmImwcNpakkORAkM0B3UR5rTjHhZ+lxndL5cT9HUy
ktxLCKD4IOx01231AxPTcP4znuCVSKXy1LItk5nhOwMzR56ezgw5gOHSZP853Lm8
7Xy3CSi6O+sUr0AhtJPWtj1dh6CsGZAXGkrK9qzYF+YRbGd5D6Bac=
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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=sh.exe, findutils, shexe, UD:sh.exe
X-HELO: smtp-out-so.shaw.ca
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: Corner-case bug in .exe handling?
To: cygwin AT cygwin DOT com
References: <5400e6ecebaa25efa46f0011be3fc58b58c4a69c DOT camel AT cygwin DOT com> <20190320092421 DOT GR3908 AT calimero DOT vinschen DOT de>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Openpgp: preference=signencrypt
Message-ID: <0b941a73-d901-257e-d0c9-52faaf3e138f@SystematicSw.ab.ca>
Date: Wed, 20 Mar 2019 12:55:40 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.0
MIME-Version: 1.0
In-Reply-To: <20190320092421.GR3908@calimero.vinschen.de>
X-IsSubscribed: yes

On 2019-03-20 03:24, Corinna Vinschen wrote:
> On Mar 19 18:02, Yaakov Selkowitz wrote:
>> Just came across this with 3.0.4 on both Win7 and Win10 1804:
>>
>> $ ls -1 /usr/bin/python2.7
>> /usr/bin/python2.7
>> $ ls -1 /usr/bin/python[2-9].[0-9]
>> /usr/bin/python3.5
>> /usr/bin/python3.6
>> /usr/bin/python3.7
>> /usr/bin/python3.8
>>
>> python2.7 is the actual .exe where python3.* are symlinks, but
>> shouldn't 2.7 still be included in the latter?
> 
> No, even if that looks weird.  But think about what happens.  ls calls
> readddir.  readdir returns "python2.7.exe".  The matching is not done by
> Cygwin, but by the shell.  And python2.7.exe simply doesn't match
> "python[2-9].[0-9]".
> 
> Nothing Cygwin can do about, unless we suppress the .exe suffix in
> readdir/realpath/readlink output just like we do with the ".lnk" suffix
> for the old winsymlink symlink style.

To also fix findutils and other glob interfaces, the filename with and without
the .exe suffix would have to be returned to support both:

	find /bin/ -name '*sh'

and

	find /bin/ -name 'sh.exe'

unless you wanted to globally disallow finding any file with suffix .exe and at
the same time restore the suffix in all cases where it is explicitly required?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

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