projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ad7be5
)
Use line buffering on stdout
author
Kris Davis
<Kris.Davis@hgst.com>
Wed, 30 Sep 2015 16:00:00 +0000
(18:00 +0200)
committer
Jens Axboe
<axboe@fb.com>
Wed, 30 Sep 2015 16:00:00 +0000
(18:00 +0200)
Line Buffer stdio to prevent multi-thread output from
mixing within a line
Signed-off-by: Jens Axboe <axboe@fb.com>
fio.c
patch
|
blob
|
blame
|
history
diff --git
a/fio.c
b/fio.c
index ee6eae24c91acd14fc72884b700fd801fb31246e..bafbd48e7ae35c00782af205308ce89a8c665d4e 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-42,6
+42,12
@@
int main(int argc, char *argv[], char *envp[])
if (parse_options(argc, argv))
goto done;
+ /*
+ * line buffer stdout to avoid output lines from multiple
+ * threads getting mixed
+ */
+ setvbuf(stdout, NULL, _IOLBF, 0);
+
fio_time_init();
if (nr_clients) {