Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2017 12:33:46 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326526 - head/usr.bin/man
Message-ID:  <201712041233.vB4CXkYH068938@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Mon Dec  4 12:33:46 2017
New Revision: 326526
URL: https://svnweb.freebsd.org/changeset/base/326526

Log:
  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

Modified:
  head/usr.bin/man/man.sh

Modified: head/usr.bin/man/man.sh
==============================================================================
--- head/usr.bin/man/man.sh	Mon Dec  4 11:25:34 2017	(r326525)
+++ head/usr.bin/man/man.sh	Mon Dec  4 12:33:46 2017	(r326526)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712041233.vB4CXkYH068938>