It seems to me that although the execute watchdog works very well (I know,
I've reused in personal code), the Execution code isnt actually checking for
a failure
Take a task which needs a sleep command to hand
<target name="sleep fifteen seconds" >
<echo message="sleeping for 15 seconds" />
<exec executable="sleep"
failonerror="false"
timeout="2000">
<arg value="15" />
</exec>
</target>
Run this in verbose mode, optionally with a version of ExecuteWatchdog which
prints something when it wakes up
sleep fifteen seconds:
[echo] sleeping for 15 seconds
[exec] Current OS is Windows 2000
[exec] sleep 15
timeout: killing process
[exec] Result: 1
The task does notice the return value is set, but this is really some
artifact of how the runtime responds to process.getExitValue() once the
process has been destroyed; it isn't a real return code.
As it stands, if failonerror=true then the exception will be thrown,
provided sun dont change that behaviour of java.lang.Process, which is
unlikely. I could add a better warning message in ExecTask to indicate that
the timeout kicked in, and doc the behavior.
Seem reasonable?
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>