emezeske / lein-cljsbuild

Leiningen plugin to make ClojureScript development easy.
Other
1.1k stars 151 forks source link

Fix #453: use ProcessBuilder for output redirect #459

Closed sfnelson closed 7 years ago

sfnelson commented 7 years ago

Pull request #436 removes the call to exit that was added to address #171. This caused a regression in testing and notify behaviour that was reported as #453, where subprocesses would hang for 30 seconds after the subprocess completed.

This commit avoids the need for pump threads to copy data from subprocess streams by using ProcessBuilder's existing Redirect functionality to either write redirect stream output to files directly, or to inherit System.out and System.err from the main process. This means that lein test etc now terminate in a reasonable time again, and avoids the call to exit that was causing problems for trampoline tasks.

mneise commented 7 years ago

This looks great, thank you!