From: Frank Lichtenheld Date: Tue, 18 Sep 2007 16:04:24 +0000 (+0200) Subject: Packages::DoSearchContents: Avoid breaking the grep pipe X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=aee28210328cf1867daba3d397bf77d0baa24ccc;p=deb%2Fpackages.git Packages::DoSearchContents: Avoid breaking the grep pipe Since grep doesn't handle SIGPIPE in any sane way but instead clutters the error.log with useless comments like "grep: writing output: Broken pipe" for each and every line it wants to write, lets make it happy and read all the stuff in even if we don't use it. --- diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index 7054bb9..1be7d44 100644 --- a/lib/Packages/DoSearchContents.pm +++ b/lib/Packages/DoSearchContents.pm @@ -75,6 +75,7 @@ sub do_search_contents { &searchfile(\@results, reverse($_)."/", \$nres, $reverses); last if $Packages::Search::too_many_hits; } + while () {}; close FILENAMES or warn "fgrep error: $!\n"; } else {