This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: the .exe extension


On Fri, Mar 12, 2010 at 04:49:37PM +0100, Thomas Wolff wrote:
>On 12.03.2010 16:16, Eric Blake wrote:
>>> ...
>>>      
>> 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.
>>    
>I'm just pondering the bold idea (probably to be discarded) that it 
>*could* be detected by "magic number" checking, i.e. renaming a new file 
>on-the-fly after a few bytes of PE-COFF have been written to its 
>beginning... 8-)

...which is pretty much what we're already doing...

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]