diff options
author | dillon <dillon@FreeBSD.org> | 2001-02-05 01:24:40 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2001-02-05 01:24:40 +0000 |
commit | f5aab66f3776c79d592353db9452e9a63b431060 (patch) | |
tree | 577de410a4f3dc431f2340b3afdfad02f5b759e9 /gnu | |
parent | 131f88863840a9d35c58835c12125b5827928443 (diff) | |
download | FreeBSD-src-f5aab66f3776c79d592353db9452e9a63b431060.zip FreeBSD-src-f5aab66f3776c79d592353db9452e9a63b431060.tar.gz |
Finish draining any input prior to closing the pipe, to prevent unsightly
'Broken pipe' messages from gzcat.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/man/makewhatis/makewhatis.perl | 3 |
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 7b55005..2080aa5 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; } } |