From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98502 invoked by alias); 21 Mar 2019 12:07:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 98478 invoked by uid 89); 21 Mar 2019 12:07:43 -0000 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 Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Mar 2019 12:07:41 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mdevh-1gXbjP3pBZ-00ZfYB for ; Thu, 21 Mar 2019 13:07:38 +0100 Received: by calimero.vinschen.de (Postfix, from userid 500) id 60B09A80973; Thu, 21 Mar 2019 13:07:38 +0100 (CET) Date: Thu, 21 Mar 2019 12:07:00 -0000 From: Corinna Vinschen 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) X-SW-Source: 2019-03/txt/msg00518.txt.bz2 --82I3+IH0IqGh5yIs Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1723 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" Content-length: 833 -----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--