Flexible I/O Tester development
 help / color / mirror / Atom feed
* ETA no longer works when -o specified
@ 2014-05-28 20:24 Rik Faith
  2014-05-29 20:12 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Rik Faith @ 2014-05-28 20:24 UTC (permalink / raw)
  To: fio

Regarding fio version fio-2.1.9-17-gd9b1 (after April 11, 2014):

A recent change (5e1d8745471d1f315113c5c3fd8b93809d9ddff9) caused stdout
to be closed when -o was specified, which prevents ETA output from showing
up on stdout even when, e.g., json is being saved in the file.

This patch continues to close f_out so that there is no leak if multiple -o
options are specified, but doesn't close stdout.  Hence, ETA works again
when it should.

diff --git a/init.c b/init.c
index 4c5a8dd..a546861 100644
--- a/init.c
+++ b/init.c
@@ -1739,7 +1739,7 @@ int parse_cmd_line(int argc, char *argv[], int
client_type)
                        write_bw_log = 1;
                        break;
                case 'o':
-                       if (f_out)
+                       if (f_out && f_out != stdout)
                                fclose(f_out);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-29 20:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28 20:24 ETA no longer works when -o specified Rik Faith
2014-05-29 20:12 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox