Bug 223560 - man(1) hangs for uncompressed catpages
Summary: man(1) hangs for uncompressed catpages
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
: 163219 223558 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-11-09 11:39 UTC by Wolfram Schneider
Modified: 2017-12-08 10:45 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2017-11-09 11:39:40 UTC
I used man(1) for uncompressed catpages. It hangs.

How to repeat:

$ mkdir man man/cat1 man/man1
$ man cat > man/cat1/cat.1
$ man -M man cat
[ it hangs, and waiting for user input. press ^D to continue ]

Workaround: always compress catpages
$ gzip man/cat1/cat.1 
$ man -M man cat
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-12-04 12:34:08 UTC
A commit references this bug:

Author: bapt
Date: Mon Dec  4 12:33:46 UTC 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

Changes:
  head/usr.bin/man/man.sh
Comment 2 Baptiste Daroussin freebsd_committer freebsd_triage 2017-12-04 12:57:05 UTC
*** Bug 223558 has been marked as a duplicate of this bug. ***
Comment 3 Baptiste Daroussin freebsd_committer freebsd_triage 2017-12-04 12:57:09 UTC
*** Bug 163219 has been marked as a duplicate of this bug. ***
Comment 4 commit-hook freebsd_committer freebsd_triage 2017-12-08 10:42:12 UTC
A commit references this bug:

Author: bapt
Date: Fri Dec  8 10:42:06 UTC 2017
New revision: 326685
URL: https://svnweb.freebsd.org/changeset/base/326685

Log:
  MFC r326526:

  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

Changes:
_U  stable/11/
  stable/11/usr.bin/man/man.sh
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-12-08 10:45:17 UTC
A commit references this bug:

Author: bapt
Date: Fri Dec  8 10:44:45 UTC 2017
New revision: 326686
URL: https://svnweb.freebsd.org/changeset/base/326686

Log:
  MFC r326526:

  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

Changes:
_U  stable/10/
  stable/10/usr.bin/man/man.sh