develooper Front page | perl.perl5.porters | Postings from May 2007

Bug in IO::Pipe

Alain Williams
May 31, 2007 04:16
Bug in IO::Pipe
Message ID:

I just fell over a problem in IO::Pipe - the documentation needs to be a little clearer.

Take the code:

	my $h = IO::Pipe->new or die("can't create pipe");
	my $line = <$h>;
	print "read: '$line'\n";

Which was my first cut in a long running perl script.
This accumulated hundreds of children, if I replace the close($h) by:


the child processed are reaped correctly.

It may be an idea to add a comment about this in the documentation to warn others
about the pitfall.

If you wish I could submit a patch.


Alain Williams
Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256
Parliament Hill Computers Ltd. Registration Information:
#include <std_disclaimer.h> Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About