Re: [Toybox] Weird stdout buffering effects

2023-10-26 Thread enh via Toybox
On Tue, Oct 24, 2023 at 1:55 AM Rob Landley wrote: > > On 10/23/23 18:13, Ray Gardner wrote: > > Rob, thanks for the info, I learned some stuff about pipes from it. > > > > I also looked up setvbuf(), and the standard says it may not be used after > > a previous successful call to setvbuf(). That

Re: [Toybox] Weird stdout buffering effects

2023-10-24 Thread Rob Landley
On 10/23/23 18:13, Ray Gardner wrote: > Rob, thanks for the info, I learned some stuff about pipes from it. > > I also looked up setvbuf(), and the standard says it may not be used after > a previous successful call to setvbuf(). That makes my tests below kinda > moot. > > But still, using

[Toybox] Weird stdout buffering effects

2023-10-23 Thread Ray Gardner
Rob, thanks for the info, I learned some stuff about pipes from it. I also looked up setvbuf(), and the standard says it may not be used after a previous successful call to setvbuf(). That makes my tests below kinda moot. But still, using _IOLBF and then _IOFBF seems to work with glibc and musl

Re: [Toybox] Weird stdout buffering effects

2023-10-22 Thread Rob Landley
On 10/21/23 20:10, Ray Gardner wrote: > I am working on a little something, and I found that output from my toybuf > command redirected to a file is exceedingly slow. But if piped to cat, it > runs about as fast as expected. Linux pipe buffers consolidate transactions. $ cat

[Toybox] Weird stdout buffering effects

2023-10-21 Thread Ray Gardner
I am working on a little something, and I found that output from my toybuf command redirected to a file is exceedingly slow. But if piped to cat, it runs about as fast as expected. So I messed around with the TOYFLAG_LINEBUF and with setvbuf() modes. I put a line at the top of my program so it