v2.0.0-beta.8
Pre-releaseBreaking Changes
-
Split
process::read(reproc::stream stream, Parser &&parser)
intoprocess::read(reproc::stream stream, Parser &&parser)
andprocess::drain(reproc::stream stream, Sink &&sink)
.read
now 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.drain
differs fromread
in that the sink doesn't return a bool to telldrain
to stop reading. Instead,drain
keeps reading until the stream is closed or an error occurs.drain
does not report the stream being closed as an error.Use
read
with a parser to read separate delimited messages from a stream. Usedrain
to 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.