scala/scala — pull request #3913 by rubyu (2014-08-04 13:59:07+00:00)
Title: SI-8768 Process may block and never return value

PipedProcesses.runAndExitValue() have several issues, also discussed in #2379.

- Block when a process generated by `a.run()` quickly responded to `Process.exitValue()`.
- Leak `Thread` when `ProcessBuilder.run()` threw an error or `Process.exitValue()` interrupted.
- Leak `Process` when `ProcessBuilder.run()` threw an error.

This fixes these problems.