From e49c1d1cef245b684eadf52e265675f88023eca8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 24 Feb 2018 09:32:50 +0100 Subject: mtr: force-flush stderr and stdout prevents buffering in cases like ./mtr | tee log --- mysql-test/lib/My/Tee.pm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test/lib/My') diff --git a/mysql-test/lib/My/Tee.pm b/mysql-test/lib/My/Tee.pm index ee82e6f45ae..5985fe33739 100644 --- a/mysql-test/lib/My/Tee.pm +++ b/mysql-test/lib/My/Tee.pm @@ -1,4 +1,5 @@ package My::Tee; +use IO::Handle; # see PerlIO::via @@ -16,6 +17,7 @@ sub WRITE { my ($obj, $buf, $fh) = @_; print $fh $buf; + $fh->flush; print $copyfh $buf; return length($buf); } -- cgit v1.2.1