Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.6.7, 1.7.0
-
None
-
OS X, Ubuntu
-
Patch
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()