Breaking Changes
-
Split
process::read(reproc::stream stream, Parser &&parser)intoprocess::read(reproc::stream stream, Parser &&parser)andprocess::drain(reproc::stream stream, Sink &&sink).readnow reports the stream being closed as an error. The provided parser is also called once with an empty string before reading to give the parser the opportunity to completely process all previous output before reading new output from the stream.draindiffers fromreadin that the sink doesn't return a bool to telldrainto stop reading. Instead,drainkeeps reading until the stream is closed or an error occurs.draindoes not report the stream being closed as an error.Use
readwith a parser to read separate delimited messages from a stream. Usedrainto read the entire output of a stream.
Additions
- Added an example background.cpp that shows how to access partial results when reading the child process output in background thread.