Open freeformflow opened 9 years ago
Or just expose stdio
and stdout
as streams, since it is now trivial to convert a stream into a reactor (via stream
). In fact, since you can just pipe them to process.stdout
and process.stderr
, I'm not really sure why I didn't just do that to begin with.
As I documented in our API docs for shell(), it is based off of Node's
child_process.exec()
which returns a buffer after the Unix command is complete. This has a couple of downsides. It limits the size of the output, and keeps you from being able to know anything about the Unix command's execution during runtime.I noticed during my research that
child_process.spawn()
produces an output stream that passes along data as it becomes available, overcoming both limitations ofexec
I propose that we changeshell
or create another command that treatsspawn()
's stream as a producer and gives us access under a RFP framework.