Commit e49c1d1c authored by Sergei Golubchik's avatar Sergei Golubchik

mtr: force-flush stderr and stdout

prevents buffering in cases like

  ./mtr | tee log
parent a04e4f53
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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment