[Toybox] [PATCH] grep: add --line-buffered and fix regular buffering.

Rob Landley rob at landley.net
Wed Apr 24 15:40:49 PDT 2019


On 4/23/19 8:06 PM, enh wrote:
> (sorry. busy.)

Sigh. I'll add a config symbol you can switch on, with help text complaining
about it.

Does the attached work/suffice? (I _think_ setlinebuf(stdout) followed by
setvbuf() something else is legal as long as we haven't output anything to the
stream yet? But the man page is unclear. Presumably the admonition is because
pending unflushed data in the buffer would get discarded, but they don't _say_...)

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grep.patch
Type: text/x-patch
Size: 1052 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20190424/ee89df96/attachment-0003.bin>


More information about the Toybox mailing list