Groovy
  1. Groovy
  2. GROOVY-4048

waitForProcessOutput should also waitFor internally

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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()

      1. wf.patch
        2 kB
        Jim Jagielski

        Activity

        Jim Jagielski created issue -
        Hide
        Paul King added a comment -

        Added to trunk and 1_7_X. Thanks for the patch.

        Show
        Paul King added a comment - Added to trunk and 1_7_X. Thanks for the patch.
        Paul King made changes -
        Field Original Value New Value
        Fix Version/s 1.7.1 [ 16014 ]
        Assignee Paul King [ paulk_asert ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.8-beta-1 [ 16013 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12733001 ] Default workflow, editable Closed status [ 12744829 ]
        Mark Thomas made changes -
        Patch Submitted Yes [ 10763 ]
        Flags Patch [ 10430 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12967809 ] Default workflow, editable Closed status [ 12975504 ]
        Mark Thomas made changes -
        Assignee paulk_asert [ paulk_asert ] Paul King [ paulk ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        7d 22h 6m 1 Paul King 19/Feb/10 06:38
        Resolved Resolved Closed Closed
        47d 17h 8m 1 Paul King 08/Apr/10 00:47

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development