X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-9.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Message-ID: <4B9A5ADA.2030708@redhat.com> Date: Fri, 12 Mar 2010 08:16:42 -0700 From: Eric Blake User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: cygwin AT cygwin DOT com, Kenneth DOT Nellis AT acs-inc DOT com Subject: Re: the .exe extension References: <2BF01EB27B56CC478AD6E5A0A28931F2C1E28C AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net> In-Reply-To: <2BF01EB27B56CC478AD6E5A0A28931F2C1E28C@A1DAL1SWPES19MB.ams.acs-inc.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE4A22C099CDBB1E0ACC64D05" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enigE4A22C099CDBB1E0ACC64D05 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/12/2010 08:03 AM, Nellis, Kenneth wrote: > I wonder if there is more explanation available about how Cygwin > handles the .exe extension than I found in the User's Guide. >=20 > http://cygwin.com/cygwin-ug-net/ >=20 > I'm running 1.7.1. > In particular, I find it odd that moving a binary executable > toggles whether or not it has the .exe extension. Consider: >=20 > $ ls -l > total 8 > -rwxr-x--- 1 knellis knellis 4096 2010-03-12 09:08 a.exe > -rwxr-x--- 1 knellis knellis 4096 2010-03-12 09:37 b > $ mv a c > $ mv b d > $ ls -l > total 8 > -rwxr-x--- 1 knellis knellis 4096 2010-03-12 09:08 c > -rwxr-x--- 1 knellis knellis 4096 2010-03-12 09:37 d.exe > $ This is an area of active conversation; if you would like, you can test the latest snapshot and the experimental coreutils 8.4-1 to see if the behavior is more intuitive (that is, there are more situations where .exe is preserved across file moves or copies, and fewer places where .exe is appended on a whim if the source didn't have one). In general, cygwin does not care if the .exe is missing, but other programs (particularly cmd) do, so it is better if PE-COFF files are given the .exe extension. But implementing it is tricky - for example, in the case of 'cat a > b', there is no way to tell at the time when b is created whether it will be populated with PE-COFF contents (that is, no way to tell whether the source was a literal 'a' or 'a.exe'), so you will not get an .exe in that case. >=20 > I have a mixture of binaries with and without the .exe extension > and wonder if the mixture will somehow bite me one day. Hopefully not, but feel free to report any test cases where things need to be improved. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigE4A22C099CDBB1E0ACC64D05 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iEYEARECAAYFAkuaWtwACgkQ84KuGfSFAYC8QACg0H6M846HLSUfkB1L56wHQGFG Gx4AoLFYpxQR6FfzPGeTdjw/Xf478itt =6wBe -----END PGP SIGNATURE----- --------------enigE4A22C099CDBB1E0ACC64D05--