val out = (“cat” #< new File("/etc/passwd")).lineStream_!
println(“after command”,out)
out.foreach(println)
println(“after print”)
The above code will print the contents of the file but then appears to hang. The after print is never executed. One thought is that the command output stream is not closed but in this case the “cat” command is pretty simple and should close its output.
I am running under Akka. Not sure if that makes a difference. This works on my windows box when added to a simple “hello world” example. However, when I run in Ubuntu with akka it hangs. If I run using the form “command”.!! it works in the akka example but when I use redirection it seems to hang.