Permalink
Browse files

Recent wheel_run.t failures may be buffering-related.

Philip Gwyn suggests it might be a buffering issue.  Make sure the
child process' STDOUT and STDERR are unbuffered, and close them in
a consistent order.
  • Loading branch information...
1 parent b284e4e commit b129895e31b7e1c501f9f3f4b038a6a4fac8670c @rcaputo committed Jul 12, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/POE/Test/Loops/wheel_run.pm
@@ -540,9 +540,13 @@ sub silent_start {
pipe my ($stdin_read, $stdin_write);
my $wheel = POE::Wheel::Run->new(
Program => sub {
+ select STDERR; $|=1;
+ select STDOUT; $|=1;
eval "print STDOUT 'CHILD:'";
eval 'my $input = <STDIN>; chomp($input); print STDERR $input;';
eval 'print STDERR "CHILD:";';
+ close STDOUT;
+ close STDERR;
exit(0);
},

0 comments on commit b129895

Please sign in to comment.