ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32066] - <exec> favours .exe over .com
Date Fri, 05 Nov 2004 08:58:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32066>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32066

<exec> favours .exe over .com

stevel@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From stevel@apache.org  2004-11-05 08:58 -------
This is not part of ant, this is the documented behaviour of the Win32 API call 
::CreateProcess

"If the file name does not contain an extension, .exe is appended. Therefore, if
the file name extension is .com, this parameter must include the .com extension."

We are just calling exec() in the Java runtime, clearly the runtime itself is
calling ::CreateProcess underneath. 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/createprocess.asp

I therefore do not believe it is a bug, either in Ant or Java. 

The fact that the shell behaves differently is because it (presumably) looks
through the value of %PATHEXT%, which on my XP box is .COM;.EXE;.BAT;.CMD;.PL;
(note I deletes all the WSH scripting junk and added perl). If you type in a
command on the command line, it will search through the list in that order till
it gets a match.

<exec> does *not* go through the shell, nor does Runtime.exec() that we use -so
we get the direct semantics of ::CreateProcess(). 

Marking as invalid, because it isnt a bug. We may want to clarify this fact in
the docs

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message