Mail Archives: cygwin/2010/06/08/10:52:34
--------------enigFA0CD8AACFBE7657F045DC76
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On 06/08/2010 08:43 AM, Steven Collins wrote:
> directory as can be demonstrated by a simple "touch foo foo.exe"
> command. Both files will be created.
Arguably, both should NOT be created, for the same reasons. That is, it
is probably worth a patch to make open("foo.exe",O_CREAT|O_EXCL,mode)
fail if "foo" exists, and open("foo.exe",O_CREAT,mode) delete "foo" if
it exists, effectively renaming "foo" to "foo.exe".
> which the magic gets applied and "foo.exe", "foo.bat",
You are misunderstanding the magic. It only happens for .exe, and that
is because the Unix world is steeped in the tradition of suffix-less
executables, but Windows insists on having the .exe suffix for cmd to be
able to run an executable. Cygwin goes to various lengths to try to
support both, at the expense that you shouldn't have both exist in the
same directory. .bat has nothing to do with .exe magic.
> There certainly appear to be
> inconsistencies within the tools.
Yes, and as they get pointed out, we try to make them more consistent.
--=20
Eric Blake eblake AT redhat DOT com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
--------------enigFA0CD8AACFBE7657F045DC76
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBCAAGBQJMDlkAAAoJEKeha0olJ0Nqj5UIAJSaLyD78FaoRCYQSjMELNXs
Mz3qgWRhO0/sgsrIGGPWUfcH7xu0EMwCgQku1CxT64be5Negum5yhb8DKK1nUGlh
Kdqb6KnxgHKAH/ZvpbQWS84E7VH/yaYLIKuEH5+Jw3c41ETXchi896sZCWy1Lpqe
U9TBqCJzffqiPdfOmf5Ffe/0awLZ7ftkO68zQk8p95X7KEgynhxFqZAnwM38AO1K
FRo9P1GzDEri3Q47tGhwUpcoxTMix7CFhFtJhEiAYqd9DAXmFQ+yca7B/aNPex/f
zrm+0+8Bg4c/u8uoVqf97SV4lJ46mLP4/BP2InwvkfIpt1T8u+A/8KM2nxAIUKM=
=woSw
-----END PGP SIGNATURE-----
--------------enigFA0CD8AACFBE7657F045DC76--
- Raw text -