Bug#554945: Autoflushing of stdout is broken with perl 5.10

Dominic Hargreaves dom at earth.li
Sat Sep 7 17:43:12 UTC 2013


On Sat, Nov 07, 2009 at 03:05:23PM +0200, Eugene V. Lyubimkin wrote:
> Hi Roger,
> 
> Roger Leigh wrote:
> > Package: perl
> > Version: 5.10.1-6
> > Severity: normal
> > 
> > This thread also describes the problem:
> >   http://coding.derkeiler.com/Archive/Perl/comp.lang.perl.misc/2009-06/msg00035.html
> Actually, the thread conclusion is the construction itself works. See three
> last messages. Personally, I use STDOUT flushing in one of my Perl programs
> and it works fine.
> 
> Moreover, this program which uses dup() works perfectly fine:
> 
> -8<-
> #!/usr/bin/perl -w
> 
> use strict;
> use warnings;
> 
> use FileHandle;
> use POSIX;
> 
> my $new_stdout = FileHandle->new_from_fd(dup(fileno(STDOUT)), 'w');
> $new_stdout->autoflush(1);
> 
> while (1) {
> 	print { $new_stdout } 'a';
> 	sleep(1);
> }
> ->8-
> 
> Can you construct a small program to reproduce?

Hi Roger,

Do you find that this is still an issue for you with current versions
of perl? With the lack of a reproducible test case there's not much
we can do about this report, so I would like to either get some more
information about the issue, or close the report.

Thanks!
Dominic.




More information about the Perl-maintainers mailing list