dmesg - flush stdout before sleeping
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 18 Aug 2014 06:36:46 +0000 (23:36 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 18 Aug 2014 06:36:46 +0000 (23:36 -0700)
* Flush output before sleeping when dmesg -f is specified.

sbin/dmesg/dmesg.c

index 6449f4c..3f7ecd8 100644 (file)
@@ -170,6 +170,7 @@ main(int argc, char **argv)
                        if (rindex == cur.msg_bufx) {
                                if (tailmode == 0)
                                        break;
+                               fflush(stdout);
                                if (tailmode == 1)
                                        sleep(1);
                        }