Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
1.0, 1.1
-
None
-
Windows XP
Description
This has been discussed on the commons-users mailing list. The patch intends to solve the following problem:
when a process runs longer than allowed by a configured watchdog's timeout, the watchdog tries to destroy it and then DefaultExecutor tries to clean up by joining with all installed pump stream threads. Problem is, that sometimes the native process doesn't die and thus streams aren't closed and the stream threads do not complete.
The patch provides setAlwaysWaitForStreamThreads(boolean) method in PumpStreamHandler. By default, alwaysWaitForStreamThreads is set to true to preserve the current behavior. If set to false, and process is killed by watchdog, DefaultExecutor's call into ErrorStreamHandler.stop will NOT join the stream threads and DefaultExecutor will NOT attempt to close the streams, so the executor's thread won't get stuck.
Additionally, this patch fixes a small but annoying bug in DefaultExecuteHandler.setExitValues(int[])