Re: [hackers] [sbase] [PATCH 00/10] IO improvements and some bug fixes

From: Michael Forney <mforney_AT_mforney.org>
Date: Mon, 5 Dec 2016 01:03:27 -0800

On Mon, Dec 5, 2016 at 12:57 AM, Martin K├╝hne <mysatyre_AT_gmail.com> wrote:
> Sorry if this is completely off the hook now, but if FILE's buffering
> is an issue here, can't we just setbuf(NULL)?

This would eliminate the extra copies, but we still have the issue of
doing fread repeated reads until the passed in buffer is completely
filled before we are able to write anything. Run something like make
2>&1 | cat, and you will see the output only appear in large chunks.

I guess my main point with this patch set is, we shouldn't be using
the terrible stdio API and suffering from its shortcomings when a
plain read and write work just as well if not better...
Received on Mon Dec 05 2016 - 10:03:27 CET

This archive was generated by hypermail 2.3.0 : Mon Dec 05 2016 - 10:12:18 CET