diff options
author | dlg <dlg@openbsd.org> | 2020-12-29 23:26:48 +0000 |
---|---|---|
committer | dlg <dlg@openbsd.org> | 2020-12-29 23:26:48 +0000 |
commit | 64ba8693d7bc4b79c056716bc95144f13769f658 (patch) | |
tree | 22c79f601e27c27ad5ca573e5271467218ffbddc /usr.bin/kstat | |
parent | Allocate new buffer space based on requested need. (diff) | |
download | wireguard-openbsd-64ba8693d7bc4b79c056716bc95144f13769f658.tar.xz wireguard-openbsd-64ba8693d7bc4b79c056716bc95144f13769f658.zip |
fflush after outputting a set of stats.
this helps when you're trying to pipe stuff into other programs
(like awk and ttyplot).
Diffstat (limited to 'usr.bin/kstat')
-rw-r--r-- | usr.bin/kstat/kstat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/kstat/kstat.c b/usr.bin/kstat/kstat.c index dc4e2db0686..5ea57763dd8 100644 --- a/usr.bin/kstat/kstat.c +++ b/usr.bin/kstat/kstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kstat.c,v 1.6 2020/08/13 12:37:16 schwarze Exp $ */ +/* $OpenBSD: kstat.c,v 1.7 2020/12/29 23:26:48 dlg Exp $ */ /* * Copyright (c) 2020 David Gwynne <dlg@openbsd.org> @@ -525,6 +525,8 @@ kstat_print(struct kstat_tree *kt) break; } } + + fflush(stdout); } static void |