$EXEC output streaming

Sebastian Daschner java at sebastian-daschner.de
Mon Nov 2 09:26:49 UTC 2015


Hi there,

As shortly discussed during Adam Bien's JavaOne talk, the $EXEC function
blocks and shows no output until the spawned process ends.
This may be a problem for using Nashorn scripts as automation tasks.

On one side the output of a long running task (e. g. a build task) is
only shown at once after the process has been finished. For instance see
the output of $EXEC("mvn clean deploy").
On the other side processes which will not end automatically like `tail
-f something.log` will show no output at all and block the execution
indefinitely.

However, it would be a very helpful enhancement to make this streaming
of process outputs possible.
Maybe in combination with java.io.OutputStream?


Thanks!

Sebastian


More information about the nashorn-dev mailing list