Date: Wed, 6 Mar 2019 15:19:04 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r344844 - head/usr.bin/ctlstat Message-ID: <201903061519.x26FJ4Yc004652@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Mar 6 15:19:04 2019 New Revision: 344844 URL: https://svnweb.freebsd.org/changeset/base/344844 Log: Flush stdout after each iteration. Without this, if output is redirected from the console, it is buffered for too long, making tool quite unusable. MFC after: 1 week Sponsored by: iXsystems, Inc. Modified: head/usr.bin/ctlstat/ctlstat.c Modified: head/usr.bin/ctlstat/ctlstat.c ============================================================================== --- head/usr.bin/ctlstat/ctlstat.c Wed Mar 6 08:52:02 2019 (r344843) +++ head/usr.bin/ctlstat/ctlstat.c Wed Mar 6 15:19:04 2019 (r344844) @@ -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?201903061519.x26FJ4Yc004652>