Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4048

waitForProcessOutput should also waitFor internally

    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
    • Flags:
      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()

        Attachments

        1. wf.patch
          2 kB
          Jim Jagielski

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              jimjag Jim Jagielski
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: