On Wed, Apr 24, 2019 at 3:40 PM Rob Landley <r...@landley.net> wrote: > > 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.
well, it's not necessarily grep i'm worried about. i think if all the other toys are now going to be line-buffered, it doesn't make much sense to single out grep like this. > 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_...) (POSIX explicitly says that it's only valid before any output, but bionic [and BSDs] flush output data and discard input data if you call setvbuf [and the others are implemented in terms of setvbuf].) > Rob _______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net