Explicitly flush output at end of each zevent

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
This commit is contained in:
Craig Loomis 2013-07-05 10:51:36 -04:00 committed by Brian Behlendorf
parent a1d9543a39
commit 50fe577d1f
1 changed files with 1 additions and 0 deletions

View 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);
}