- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 17 Jan 2006 04:56:59 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator
In directory hutz:/tmp/cvs-serv2646
Modified Files:
LinkChecker.pm
Log Message:
Safe pipe patch, courtesy of Slaven Rezic
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2721
Index: LinkChecker.pm
===================================================================
RCS file: /sources/public/perl/modules/W3C/LogValidator/lib/W3C/LogValidator/LinkChecker.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- LinkChecker.pm 15 Jan 2006 19:30:50 -0000 1.5
+++ LinkChecker.pm 17 Jan 2006 04:56:56 -0000 1.6
@@ -156,7 +156,13 @@
print " processing #$total_census $uri..." if ($verbose > 1);
# FIXME at some point we will use the library instead of running the script
- open(LINK, "$checklink $uri 2>/dev/null |");
+ #open(LINK, "$checklink $uri 2>/dev/null |");
+ open LINK, "-|" or do {
+ require File::Spec;
+ open STDERR, "> " . File::Spec->devnull or die $!;
+ exec $checklink, $uri;
+ die "Can't execute $checklink: $!";
+ };
my $num_errs = 0;
print "\n" if ($verbose > 2);
while (<LINK>) {
Received on Tuesday, 17 January 2006 04:57:02 UTC