]> rtime.felk.cvut.cz Git - sojka/can-utils.git/commitdiff
canbusload: flush output at the end of each cycle
authorKurt Van Dijck <kurt.van.dijck@eia.be>
Wed, 21 Dec 2011 09:08:57 +0000 (10:08 +0100)
committerOliver Hartkopp <socketcan@hartkopp.net>
Tue, 10 Jan 2012 16:41:07 +0000 (17:41 +0100)
When canbusload is piped to another program, the output
is queued for several cycles. This patch will flush the output
explicitely.

Signed-off-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
canbusload.c

index 26323d269ed1a45282418cfe53029ed141b78812..2693b9ea67d49bd8219581853ebfcc40638a10ae 100644 (file)
@@ -201,6 +201,7 @@ void printstats(int signo)
        }
 
        printf("\n");
+       fflush(stdout);
 
        alarm(1);
 }