From f50332c57aff6c2776493de2e7f59d9ce8a35894 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Thu, 27 Sep 2007 14:26:09 +0200 Subject: [PATCH] lnstat : force a flush before sleep Hi Stephen This small patch allows to use lnstat/rtstat with a pipe output, without a full bufferisation. Thank you Eric Signed-off-by: Stephen Hemminger --- misc/lnstat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/misc/lnstat.c b/misc/lnstat.c index 4dc10722f..b56598ab8 100644 --- a/misc/lnstat.c +++ b/misc/lnstat.c @@ -328,6 +328,7 @@ int main(int argc, char **argv) print_hdr(stdout, header); lnstat_update(lnstat_files); print_line(stdout, lnstat_files, &fp); + fflush(stdout); sleep(interval); } } -- 2.47.2