Package: libipc-run-perl Version: 0.78-2 Severity: normal
There's a memory leak with IPC::Run::run($cmd, '<', \undef) [which runs a program with stdin closed]. The equivalent IPC::Run::run($cmd, '<&-') does not have a memory leak. The IPC::Run man page suggests IPC::Run::run($cmd, '<', \undef). Consider this script: #!/usr/bin/perl use IPC::Run; for my $i (0..100000) { print STDERR "\r$i "; IPC::Run::run(['test', '-t', '0'], '<', \undef); my $e = $? >> 8; print STDERR "$e"; } Watch the memory usage of this program grow (e.g. type 'M' in top); whereas the one below uses constant memory. #!/usr/bin/perl use IPC::Run; for my $i (0..100000) { print STDERR "\r$i "; IPC::Run::run(['test', '-t', '0'], '<&-'); my $e = $? >> 8; print STDERR "$e"; } -- System Information: Debian Release: 3.1 APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.8-quack+20041128+quack.cs.berkeley.edu Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages libipc-run-perl depends on: ii libio-pty-perl 1:1.02-2 Perl module for pseudo tty IO ii perl 5.8.4-6 Larry Wall's Practical Extraction -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]