Open GoogleCodeExporter opened 9 years ago
I acknowledge seeing this report.
In step 2 when you did a test doing tee to /dev/stdout, note that tee(1) send
its stdin to stdout and to the file you specify, so getting two copies on
stdout is expected.
It feels to me like you're seeing the effects of buffering of output in various
places (particularly with the result from the test in the previous paragraph
having non-interleaved lines of output) but I haven't actually experimented
with this.
Original comment by bmah@es.net
on 21 Feb 2014 at 9:14
This is also somewhat related to Issue 119.
Original comment by bmah@es.net
on 21 Feb 2014 at 10:26
Hi,
I agree.
Obviously.
I wasn't clear, the issue is not that you get two reports to stdout (I wondered
if they were other outputs).
The issue is that it seems that, when you redirect stdout, it needs --verbose
flag to actually show message you get previously without --verbose when no
redirection
no redirection and no --verbose ---> some message
no redirection and --verbose ---> more message
redirection and no --verbose ---> almost nothing
redirection and --verbose ---> everything (it seems) but buffered on reports
buffering on reports --> It seems to me that there is no fflush per iprintf
call (but more likely at closing of the stream ?)
--verbose --> it seems this introduces a fflush (line 452 of iperf_server_api.c)
while my tee is line buffered:
sh -c "date; sleep 1; date" | tee -
# correctly print two identical lines then wait 1 sec before printing two
identicals lines
maybe this has to do with some buffering options set on the fd for stdout.
I agree.
Thanks for your work.
Original comment by stephane...@lip6.fr
on 23 Feb 2014 at 5:16
This might be an interesting pointer
http://stackoverflow.com/questions/13932932/why-does-stdout-need-explicit-flushi
ng-when-redirected-to-file
Original comment by stephane...@lip6.fr
on 23 Feb 2014 at 5:21
Original issue reported on code.google.com by
stephane...@lip6.fr
on 17 Feb 2014 at 11:18