Subject: | Bugfix for memory leak |
Date: | Mon, 31 May 2010 14:56:27 +0400 |
To: | bug-IPC-Run [...] rt.cpan.org |
From: | Alexander Kobernik <akobernik [...] iponweb.net> |
Most probably, the ticket is a duplicate of Bug #13660.
Distribution name and version: IPC-Run-0.89
Perl version: v5.10.1 (*) built for i486-linux-gnu-thread-multi
Operating System vendor and version: Linux finland 2.6.32-trunk-686 #1
SMP Sun Jan 10 06:32:16 UTC 2010 i686 GNU/Linux
How to reproduce the memory leak:
use IPC::Run ();
while (1) {
sleep 1;
my $stdin = '';
my $stdout = '';
my $stderr = '';
eval { IPC::Run::run( ["ls"], \$stdin, \$stdout, \$stderr ) };
die $@ if $@;
}
Patch:
--- lib/IPC/Run/IO.pm.orig 2010-05-31 14:55:01.000000000 +0400
+++ lib/IPC/Run/IO.pm 2010-05-31 14:55:12.000000000 +0400
@@ -351,6 +351,7 @@
sub _cleanup { ## Called from Run.pm's _cleanup
my $self = shift;
undef $self->{FAKE_PIPE};
+ undef $self->{FILTERS};
}
(found here:
http://download2.3tera.net/oss/files/osm/perl-IPC-Run-0.80-2/IPC-Run-mem-leak.patch)
--
Alexander O. Kobernik