ninjudd / drip

Fast JVM launching without the hassle of persistent JVMs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to output when input is redirected

tpope opened this issue · comments

First, mke sure the daemon is running:

$ drip -cp clojure.jar clojure.main -e nil

From then on, when stdin is redirected, nothing is output.

$ drip -cp clojure.jar clojure.main -e 1 </dev/null
$ drip -cp clojure.jar clojure.main -e 1
1

I experienced the same issue when trying out lein-exec with the following script:

#!/bin/sh lein-exec

(println "bogus")
(doseq
  (map println (java.io.BufferedReader. *in*)))

The following command invocation doesn't print anything on stdout:

$ echo "foobar" | ./test.clj
$

While it works as expected without using drip:

$ unset JAVA_CMD
$ echo "foobar" | ./test.clj
bogus
foobar
$

This is still an issue.
It (of course) affects logstash too https://groups.google.com/forum/#!topic/logstash-users/ltBCuh2wemU