In case man(1) found a catpage to display skip looking ".so" which is manpage

only.

In case we are trying to read a catpage, the manpage variable is not defined.
It results in the "cattool" having no arguments.

In case the catpage is compressed, the cattool used is "zcat" which dies if the
standard input is a terminal, meaning the function calling it is exiting as if
there were no ".so"
In case the catpage is uncompressed, the cattool used is "zcat -f" which waits
reading standard input, making the man(1) command hang.

PR:		223560
Reported by:	wosch
MFC after:	3 days
This commit is contained in:
Baptiste Daroussin 2017-12-04 12:33:46 +00:00
parent 78f23de54c
commit d9405a926c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326526

View File

@ -276,6 +276,9 @@ man_check_for_so() {
local IFS line tstr
unset IFS
if [ -n "$catpage" ]; then
return 0
fi
# We need to loop to accommodate multiple .so directives.
while true