Hi Alan,
"\n" does not explicitly force the flush. I have configured the line
buffering which is actually working on printf and fputs, but not on fwrite.
I am using some application code that is running ok on Linux, but on Nuttx
it is not flushing properly. It flush only when the buffer is filled.
I think his point was that it was implicitly flushed at every write, and
not being buffered, but I might have misunderstood.
Anyway, I wouldn't expect fwrite to buffer on a per-line basis. fwrite
is basically there for doing binary I/O. If you want something buffered,
line oriented and user fr
Hi Jernej,
Please define "not working"! :-)
Are you flushing it? Also "\n" at end of line forces it to be flushed.
BR,
Alan
On Friday, May 14, 2021, Jernej Turnsek wrote:
> Hi all,
>
> while working with stdout fwrite function, I have noticed that line
> buffering is not working. Is this by
Hi all,
while working with stdout fwrite function, I have noticed that line
buffering is not working. Is this by design or it is a bug?
Regards,
Jernej