From: Matt S Trout Date: Fri, 11 Nov 2011 08:26:23 +0000 (+0000) Subject: autoflush output pipe just in case X-Git-Tag: v0.001001~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FTak.git;a=commitdiff_plain;h=3e8833259b5bf95efa2137543051a35e7655e1d3 autoflush output pipe just in case --- diff --git a/lib/Tak/STDIOSetup.pm b/lib/Tak/STDIOSetup.pm index c06efbc..1a9fc9e 100644 --- a/lib/Tak/STDIOSetup.pm +++ b/lib/Tak/STDIOSetup.pm @@ -5,11 +5,13 @@ use Log::Contextual::SimpleLogger; use Tak::ConnectionService; use Tak::Router; use Tak; +use IO::Handle; use strictures 1; sub run { open my $stdin, '<&', \*STDIN or die "Duping stdin: $!"; open my $stdout, '>&', \*STDOUT or die "Duping stdout: $!"; + $stdout->autoflush(1); # if we don't re-open them then 0 and 1 get re-used - which is not # only potentially bloody confusing but results in warnings like: # "Filehandle STDOUT reopened as STDIN only for input"