RFE: enable buffering on null-terminated data
Kaz Kylheku
kaz@kylheku.com
Tue Mar 19 05:24:25 GMT 2024
On 2024-03-17 17:12, Zachary Santer wrote:
> On Thu, Mar 14, 2024 at 11:14 AM Carl Edquist <edquist@cs.wisc.edu> wrote:
>
>> Where things get sloppy is if you add some stuff in a pipeline after your
>> build script, which results in things getting block-buffered along the
>> way:
>>
>> $ ./build.sh | sed s/what/ever/ | tee build.log
>>
>> And there you will definitely see a difference.
>
> Sadly, the man page for stdbuf specifically calls out tee as being
> unaffected by stdbuf, because it adjusts the buffering of its standard
> streams itself. The script I mentioned pipes everything through tee,
> and I don't think I'm willing to refactor it not to. Ah well.
But what tee does is set up _IONBF on its output streams,
including stdout.
More information about the Libc-alpha
mailing list