]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
lnstat : force a flush before sleep
authorEric Dumazet <dada1@cosmosbay.com>
Thu, 27 Sep 2007 12:26:09 +0000 (14:26 +0200)
committerStephen Hemminger <shemminger@linux-foundation.org>
Thu, 11 Oct 2007 19:40:15 +0000 (12:40 -0700)
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 <shemminger@linux-foundation.org>
misc/lnstat.c

index 4dc10722f898c80d81926849cedfab7ba016179b..b56598ab89ba22c18cc1789f69c908c2285a914c 100644 (file)
@@ -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);
                }
        }