Re: daemontools tai64n is unbuffered, s6-tai64n is fully buffered

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Wed, 21 Oct 2015 02:01:54 +0200

On 21/10/2015 01:05, Buck Evan wrote:
> This prints slowly enough that I can *see* that tai64nlocal is printing
> each character separately, but s6-tainlocal is printing per-line.

  Ah, I understand. s6-tai64nlocal isn't *printing* line per line, it
is *reading* line per line. It buffers its input until it gets a full
line, then converts the timestamp at the beginning, if any, then puts
the converted line into the output buffer, and flushes that buffer
before going back to reading.

  Yes, it is expected. It makes scanning for a timestamp much easier
and straightforward. Compare s6-tai64nlocal.c and tai64nlocal.c.

-- 
  Laurent
Received on Wed Oct 21 2015 - 00:01:54 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC