]> granicus.if.org Git - zfs/commitdiff
Explicitly flush output at end of each zevent
authorCraig Loomis <cloomis@astro.princeton.edu>
Fri, 5 Jul 2013 14:51:36 +0000 (10:51 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 9 Jul 2013 00:01:16 +0000 (17:01 -0700)
For "zpool events -f" flush stdout to ensure the last zevent
is always printed immediately.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1568

cmd/zpool/zpool_main.c

index 37aa2894daf4b79f273d2013c2e4ece20e87dbfc..19f1f28a9ed8eab5d6d917c128c9e281d302ad0c 100644 (file)
@@ -5243,6 +5243,7 @@ zpool_do_events_next(ev_opts_t *opts)
                        zpool_do_events_nvprint(nvl, 8);
                        printf(gettext("\n"));
                }
+               (void) fflush(stdout);
 
                nvlist_free(nvl);
        }