aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/man/makewhatis/makewhatis.perl
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2001-02-05 01:24:40 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2001-02-05 01:24:40 +0000
commiteabf71899fd55a3857df2e838493ec87d5649b8a (patch)
tree0c201090fdc326006d189b5259ca97904f5b888a /gnu/usr.bin/man/makewhatis/makewhatis.perl
parentab0ef99cfad5204b583739055f87ad436df9864f (diff)
downloadsrc-eabf71899fd55a3857df2e838493ec87d5649b8a.tar.gz
src-eabf71899fd55a3857df2e838493ec87d5649b8a.zip
Finish draining any input prior to closing the pipe, to prevent unsightly
'Broken pipe' messages from gzcat.
Notes
Notes: svn path=/head/; revision=72029
Diffstat (limited to 'gnu/usr.bin/man/makewhatis/makewhatis.perl')
-rw-r--r--gnu/usr.bin/man/makewhatis/makewhatis.perl3
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/usr.bin/man/makewhatis/makewhatis.perl b/gnu/usr.bin/man/makewhatis/makewhatis.perl
index 7b55005f4cfd..2080aa5b0a64 100644
--- a/gnu/usr.bin/man/makewhatis/makewhatis.perl
+++ b/gnu/usr.bin/man/makewhatis/makewhatis.perl
@@ -352,6 +352,7 @@ sub manual {
$list .= ' ';
}
}
+ while(<F>) { } # skip remaining input to avoid pipe errors
&out($list); close F; return 1;
} elsif (/^\.Sh/ && /^\.Sh[ \t]+["]?($section_name)["]?/) {
# ``doc'' style pages
@@ -375,9 +376,11 @@ sub manual {
$list .= ' ';
}
}
+ while(<F>) { } # skip remaining input to avoid pipe errors
&out($list); close F; return 1;
} elsif(/^\.so/ && /^\.so[ \t]+man/) {
+ while(<F>) { } # skip remaining input to avoid pipe errors
close F; return 1;
}
}