X-Recipient: archive-cygwin@delorie.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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=XdT3PhfRnrLSaWT4nGGDKmbmqVqplzbHgukkL1wQmKPq4eU6AmNwD
	y11PeJi4n9RDvunRVob+e9MeuX+jUBPOFtPUBKa8YcviFqwSuIF2+2d6YrfENOtM
	vg/NAxMd4/CayHMIyiIj5VRnJyLGQ/E8l/snhMQp0TxqwSgp41HDqc=
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:date:from:to:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=H1sZtXkq7Ng2VUEqFfgcFXjEOXI=; b=wpMriCNOnvi9Zhbj7XIKR65/myu6
	2EP6JDrdDYZyHwhDZdw06AaWfmmFdCL319bvBBOyhy+UX4cU2JI8kBSzibUPQBCX
	0pEUSZKRYcgNkevU55o7F4qh1lgkT46LI/BQQ3vJ/bDF3uUF5wWqHG+lSJllO5ho
	N2JE9B88IZXganc=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-101.8 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1728
X-HELO: mout.kundenserver.de
Date: Thu, 21 Mar 2019 13:07:38 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Corner-case bug in .exe handling?
Message-ID: <20190321120738.GB2167@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <5400e6ecebaa25efa46f0011be3fc58b58c4a69c.camel@cygwin.com> <20190320092421.GR3908@calimero.vinschen.de> <0b941a73-d901-257e-d0c9-52faaf3e138f@SystematicSw.ab.ca>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;	protocol="application/pgp-signature"; boundary="82I3+IH0IqGh5yIs"
Content-Disposition: inline
In-Reply-To: <0b941a73-d901-257e-d0c9-52faaf3e138f@SystematicSw.ab.ca>
User-Agent: Mutt/1.11.3 (2019-02-01)

--82I3+IH0IqGh5yIs
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mar 20 12:55, Brian Inglis wrote:
> 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?
> >=20
> > 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]".
> >=20
> > 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.
>=20
> To also fix findutils and other glob interfaces, the filename with and wi=
thout
> the .exe suffix would have to be returned to support both:
>=20
> 	find /bin/ -name '*sh'
>=20
> and
>=20
> 	find /bin/ -name 'sh.exe'

Do you realize the implications?  Either every executable shows
up as two distinct files, or each executable has twice the number
of hardlinks.  Either way is bad for one scenario or the other.

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

IMHO we don't change anything.  The current way of things isn't
ideal, but works more or less fine for a long time.


Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--82I3+IH0IqGh5yIs
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlyTfooACgkQ9TYGna5E
T6DtVRAAgLjPCfcBxt9yNda5EeaVSsmo/YHHEJjf97GgDG3/OaTEtwDNSjosgJi+
xpboCQeV+ocQHLZjeYITMYE7DwUcLEyM0W00TMEgkc0w7cdfSoQFTCOZFIYapzLr
UFPtW5tuqegh1k7bDH3C8eB30hBy8+s+oPJoFpZPFfugU1v9YfL2/4mMoJIe061R
bdK2NZuUJx0R1CQBqm4VchYcYSf4LgTvKVB+ybUEoUuyKACoEt8Z/h6m2P5UTAVZ
JLKCM8+sAnHbXYekyIuqb5U3ZpLDk5zAqJI36TlkiO6xpQfGe4Jl3RuH8YNJIPeN
+SOEEaNYsmz/HLR8iEFEzFyBt7AMV0LOYGtn5W+VdW4nNz0cp2Ct076m1G3005KQ
n0IRRj3uJ7ZlWdkygNUwbZm9wFlid9jK589nc5EPjwpWxJjYHmVGnYNH1dsHt7SK
viPUcMPPX8YniXtSGJccFanOrxo/77Oazfoisjtc0kqDxznReoF1HJLeQCssR6lj
56YJYdPjptF3Ilw88OzRwMP04MoGKptLg9tW5muw16eVoQ8JBBtbunuKuwRq//8T
m2WS3fnZ2HAnYAj60/3Mq/RZCvMgJNL04UabjV062/AXl+wiE7nxdZTrpt+CkheA
OLv0s2M61oGxK3mqoQEKF5sYQdsfh+I51W62im0ZxPk3BHR2wIg=
=UGYx
-----END PGP SIGNATURE-----

--82I3+IH0IqGh5yIs--
