mirror_zfs/cmd/zpool
Rob N 5f2700eee5
zpool: flush output before sleeping
Several zpool commands (status, list, iostat) have modes that present
some information, sleep a while, present the current state, sleep, etc.
Some of those had ways to invoke them that when piped would appear to do
nothing for a while, because non-terminals are block-buffered, not
line-buffered, by default.  Fix this by forcing a flush before sleeping.

In particular, all of these buffered:
- zpool status <pool> <interval>
- zpool iostat -y<m> <pool> <interval>
- zpool list <pool> <interval>

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #15593
2023-12-05 11:53:14 -08:00
..
compatibility.d ZTS: Test for all known zpool feature sets 2023-11-09 10:58:23 -08:00
os Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool.d zed: misc vdev_enc_sysfs_path fixes 2023-11-07 09:09:24 -08:00
Makefile.am Add compatibility symlinks for FreeBSD 12.{3,4} and 13.{0,1,2} 2023-05-26 15:37:15 -07:00
zpool_iter.c Add zfs_prepare_disk script for disk firmware install 2023-09-21 08:36:26 -07:00
zpool_main.c zpool: flush output before sleeping 2023-12-05 11:53:14 -08:00
zpool_util.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zpool_util.h Add zfs_prepare_disk script for disk firmware install 2023-09-21 08:36:26 -07:00
zpool_vdev.c zed: misc vdev_enc_sysfs_path fixes 2023-11-07 09:09:24 -08:00