On 5/16/24 06:46, Yi-Yo Chiang via Toybox wrote:
> The comment string claims xputs() to write, flush and check error.
> However the 'flush' operation is actually missing due to 3e0e8c6
> changing the default buffering mode from 'line' to 'block'.

That's sort of an Elliott question?

Originally, xprintf() and friends all flushed (which is necessary to detect
output errors and xexit() if so), but Elliott complained that was too slow, so
the flushes got removed, and then we changed the default stdout buffering type,
and...

Alas, it was a whole multi-year thing. Elliott has volunteered to put manual
flushes everywhere it's a problem. I've seriously thought about going
exclusively to file descriptor output (dprintf() is in posix now) and leaving
FILE * for input only.

Personally, I honestly believe the _proper_ fix is to upgrade the kernel to use
vdso to implement nagle's algorithm on file descriptor 1:

https://landley.net/notes-2024.html#28-04-2024

But I'm not holding my breath.

Rob

P.S. I should post some subset of
https://landley.net/bin/mkroot/latest/linux-patches/ to linux-kernel again. So
they can be ignored again.
_______________________________________________
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to