Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Mar 2019 20:29:11 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r345116 - stable/11/usr.bin/ctlstat
Message-ID:  <201903132029.x2DKTBtO040473@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Mar 13 20:29:10 2019
New Revision: 345116
URL: https://svnweb.freebsd.org/changeset/base/345116

Log:
  MFC r344844: Flush stdout after each iteration.
  
  Without this, if output is redirected from the console, it is buffered for
  too long, making tool quite unusable.

Modified:
  stable/11/usr.bin/ctlstat/ctlstat.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.bin/ctlstat/ctlstat.c
==============================================================================
--- stable/11/usr.bin/ctlstat/ctlstat.c	Wed Mar 13 20:28:48 2019	(r345115)
+++ stable/11/usr.bin/ctlstat/ctlstat.c	Wed Mar 13 20:29:10 2019	(r345116)
@@ -717,6 +717,7 @@ main(int argc, char **argv)
 		}
 
 		fprintf(stdout, "\n");
+		fflush(stdout);
 		ctx.flags &= ~CTLSTAT_FLAG_FIRST_RUN;
 		if (count != 1)
 			sleep(waittime);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903132029.x2DKTBtO040473>