Package: libnet-dns-zone-parser-perl
Version: 0.02-1
Severity: normal
Tags: patch
Parser.pm relies on `$cmd` setting $_ (CHILD_ERROR). However,
it only does that correctly when there is no signal handle for
sigchild.
perlvar(1) says:
| If you have installed a signal handler for "SIGCHLD", the value
| of $? will usually be wrong outside that handler.
I was seeing lots of bogus messages of this kind:
} READ FAILURE: from named-compilezone: command failed: No child processes
--- /usr/share/perl5/Net/DNS/Zone/Parser.pm 2010-01-23 19:33:23.000000000
+0100
+++ ./Parser.pm 2010-01-23 20:15:35.098108247 +0100
@@ -928,6 +928,10 @@
my $cmd="named-compilezone -i none -o $tmpfname $origin $filename";
print ";; Running: ".join(" ", $cmd)."\n" if $debug;
+ # If a global sighandler for SIGCHLD is set,
+ # then $? will probably be wrong. Therefore
+ # overwrite it locally.
+ local $SIG{CHLD} = undef;
my @result=`$cmd`;
if ($debug){
foreach my $i (@result){
Appears to fix this issue.
Cheers,
weasel
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]