This is the mail archive of the
mailing list for the Cygwin project.
RE: Inconsistence on file operation when the name already exists with exe extension
Matt Seitz <firstname.lastname@example.org> escribiÃ:
>> On Behalf Of Aaron Schneider
>> I believe that Cygwin tries to emulate cmd.exe
>No, Cygwin does not try to emulate the cmd.exe shell. Cygwin tries to
>emulate a shell running on Linux, usually the "bash" shell.
>That's why you have to use "./file.exe" or "./file" to run a program
>from the current directory (if the current directory is not included in
>If you want to use "cmd.exe" as your shell, you can try running
>"cmd.exe", and then execute the other Cygwin programs you want directly
>(C:\cygwin\bin\file.exe) from cmd.exe. But that may run into problems.
>Problem reports: http://cygwin.com/problems.html
>Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
You're right that cygwin shell tries to emulate bash, I just twisted things.
The problem is that in unix executables don't have extension but they actually do in cygwin so I think that's the root of the problem.
Probably compiling binaries under cygwin without the exe extension, like unix, is not an alternative, or is it? Cygwin may detect if it is executable checking if it's PE format; if it is perl script. Just check if file is present in path or run. /file
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple