mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
mtr: force-flush stderr and stdout
prevents buffering in cases like ./mtr | tee log
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user