Hey
I’m trying to understand if this is possible.
I’d like to open a new unix process, and stream the output using Seq, but I can’t really figure out the correct incantation.
This is what I’ve tried so far
Eio_main.run @@ fun env ->
let proc_mgr = Eio.Stdenv.process_mgr env in
let output = Eio.Process.parse_out proc_mgr Eio.Buf_read.lines ["cat"]
~stdin:(Eio.Flow.string_source "One two three\nOne two three\n")
in
output |> Seq.iter (fun line -> Eio.traceln "%S" line);;
and the error I’m getting is
Exception: Failure “Unexpected data after parsing (at offset 0)”.
Raised at Stdlib.failwith in file “stdlib.ml”, line 29, characters 17-33