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

waitForProcessOutput should also waitFor internally

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.7, 1.7.0
    • 1.7.1, 1.8-beta-1
    • groovy-jdk
    • 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()

      Attachments

        1. wf.patch
          2 kB
          Jim Jagielski

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: