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.
This commit is contained in:
mav 2019-03-06 15:19:04 +00:00
parent 3343680792
commit 21579acacb

View File

@ -717,6 +717,7 @@ main(int argc, char **argv)
} }
fprintf(stdout, "\n"); fprintf(stdout, "\n");
fflush(stdout);
ctx.flags &= ~CTLSTAT_FLAG_FIRST_RUN; ctx.flags &= ~CTLSTAT_FLAG_FIRST_RUN;
if (count != 1) if (count != 1)
sleep(waittime); sleep(waittime);