There is a lengthy Unix process that I would like to write and process using Clojure. A good example of one of these processes is the repl-y / nREPL session: its duration is indefinite, and the output is printed to standard output.
If I try (clojure.java.io/sh "lein" "repl") , the evaluation will be blocked until the main process is complete, and then I can observe the result.
This is not what I want - I want to receive the stream immediately.
Can I achieve this with Clojure.java.io or similar existing Clojure tools? Do not mind resorting to Java otherwise.
source share