Finish draining any input prior to closing the pipe, to prevent unsightly

'Broken pipe' messages from gzcat.
This commit is contained in:
Matthew Dillon 2001-02-05 01:24:40 +00:00
parent ab0ef99cfa
commit eabf71899f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72029

View File

@ -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;
}
}