I am writing a cmd wrapper which should intercept streams for any cmd application just as any other cmd wrapper would. So far I have succeded and most apps work fine like 'ping' and others. However, when I start Clojure or Scala REPLs, at first everyhtings is OK, but when I enter a multiline function or when I get an error, the messaging stops like if something is stuck in the pipe. Any communication between the REPL and my wrapper stops. Since I channel both stdout and stderr streams of all the apps that I launch through the wrapper, it is unclear to me, what to do in this situation, why does the output not get intercepted?
UPDATE: A new information is suggested by user om-nom-nom, which reveals that Scala and Clojure REPLs are using jline for advanced console interaction handling. So this poses several new questions: Why is working with jline different than with standard streams? Are there any ways to re-route the jline streams in a manner similar to normal streams? What is the best way to work with jline like that?