aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob N <robn@despairlabs.com>2023-12-05 19:53:14 +0000
committerGitHub <noreply@github.com>2023-12-05 19:53:14 +0000
commit5f2700eee5428b9ca4d4689c6985e751b733cbc6 (patch)
treee52bbeb160564954895cab76c82fc2dccda0b419
parentc7b6119268b87ba16249550a64d28594185595fb (diff)
downloadsrc-5f2700eee5428b9ca4d4689c6985e751b733cbc6.tar.gz
src-5f2700eee5428b9ca4d4689c6985e751b733cbc6.zip
-rw-r--r--cmd/zpool/zpool_main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 9dd1d2109004..c143d637059d 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -5950,6 +5950,7 @@ zpool_do_iostat(int argc, char **argv)
print_iostat_header(&cb);
if (skip) {
+ (void) fflush(stdout);
(void) fsleep(interval);
continue;
}
@@ -5980,18 +5981,13 @@ zpool_do_iostat(int argc, char **argv)
}
- /*
- * Flush the output so that redirection to a file isn't buffered
- * indefinitely.
- */
- (void) fflush(stdout);
-
if (interval == 0)
break;
if (count != 0 && --count == 0)
break;
+ (void) fflush(stdout);
(void) fsleep(interval);
}
@@ -6514,6 +6510,8 @@ zpool_do_list(int argc, char **argv)
break;
pool_list_free(list);
+
+ (void) fflush(stdout);
(void) fsleep(interval);
}
@@ -9094,6 +9092,7 @@ zpool_do_status(int argc, char **argv)
if (count != 0 && --count == 0)
break;
+ (void) fflush(stdout);
(void) fsleep(interval);
}