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

Eugene V. Lyubimkin jackyf.devel at gmail.com
Sat Nov 7 13:05:23 UTC 2009


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?

-- 
Eugene V. Lyubimkin aka JackYF, JID: jackyf.devel(maildog)gmail.com
C++/Perl developer, Debian Developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20091107/d31b4947/attachment.pgp>


More information about the Perl-maintainers mailing list