I wanted to use systat -b -d 10 iostat 1 | something to parse output in
real time but it was not possible, systat doesn't flush output.
otto@ suggested this change, I tried it and it works.
This flush output at the end of writing a page in raw mode (-B or -b
flags).
ok?
Index: engine.c
===
RCS file: /data/cvs/src/usr.bin/systat/engine.c,v
retrieving revision 1.23
diff -u -p -r1.23 engine.c
--- engine.c17 Jan 2019 05:56:29 - 1.23
+++ engine.c19 Jul 2019 15:03:28 -
@@ -245,6 +245,7 @@ end_page(void)
if (rawmode) {
linepos = 0;
clear_linebuf();
+fflush(stdout);
} else {
move(home_line, 0);
print_cmdline();