Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.7, 1.7.0
-
Fix Version/s: 1.7.1, 1.8-beta-1
-
Component/s: groovy-jdk
-
Labels:None
-
Environment:OS X, Ubuntu
-
Patch Submitted:Yes
-
Number of attachments :
Description
Related to GROOVY-3796, there is a race condition where someone could use waitForProcessOutput() and then call exitValue and get an 'java.lang.IllegalThreadStateException: process hasn't exited' error, since the actual process itself hasn't terminated. This can be worked around with a process.waitForProcessOutput(); process.waitFor(), but this is confusing since waitForProcessOutput also implies that we wait for everything.
This patch adds a specific waitFor() to waitForProcessOutput()
Added to trunk and 1_7_X. Thanks for the patch.