DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10345>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10345 Execute task, when interrupted, does not kill processes Summary: Execute task, when interrupted, does not kill processes Product: Ant Version: 1.5Beta3 Platform: All OS/Version: All Status: NEW Severity: Critical Priority: Other Component: Core tasks AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The Execute task has a bug in: protected void waitFor(Process process) { try { process.waitFor(); setExitValue(process.exitValue()); } catch (InterruptedException e) {} } If the Execute task is interrupted, what happens is that in execute(), because the InterruptedException is ignored, the process is assumed to have completed normally, and is removed from the ProcessDestroyer. This means the processes are still hanging around and no shutdown thread is going to kill them One way to handle it is to throw the interrupted exception from waitFor() and handle it correctly in execute. By correctly handling it I mean that if the thread is interrupted, process.destroy() must be called - i.e. the process shouldn't be hanging around waiting for the shutdown hook to kill it. In general, other handling of InterruptedException should be examined for similar problems. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
