How to redirect stdout of a launched process to some writer

Using the zig standard library, you can have a Reader reading the stream of bytes send by the launched process stdout.
Set the std.process.Child stdout_behavior to .Pipe, call spawn and get the reader from child.stdout.reader().
Also see: Execute a program from zig - #2 by dimdin

4 Likes