Bug 23258 - -w and -W options break when output is not a tty
-w and -W options break when output is not a tty
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: man (Show other bugs)
6.2
All Linux
low Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Aaron Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-01-03 18:58 EST by Need Real Name
Modified: 2007-03-26 23:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-03 18:58:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2001-01-03 18:58:07 EST
The -w and -W options behave differently and produce different output when 
the stdout is a tty tty than when it is not, e.i. 

$ man -W info
/var/catman/local/cat3/info.3.gz
/usr/local/man/man3/info.3

$ man -W info | cat
/usr/local/man/man3/info.3

$ man -W info | more
/usr/local/man/man3/info.3


I haven't checked the source code, but I imagine that there is a test 
for 'isatty' early in the man program to determine whether or not to 
utilize the preformatted 'catman' pages.  This test should always be true 
when the -W or -w options are in effect, otherwise it is easy to miss the 
source of corrupted man pages.

Incidentally, the 'man' manpage mentions the ability redirect the output 
of -W but does not say anything about the fact that the output will be 
*different* than if you just let it go to a terminal.  I don't think the 
man page is incorrect for this oversight; I think the behavior is broken.
Comment 1 Bernhard Rosenkraenzer 2001-04-25 05:06:45 EDT
Fixed in 1.5i-1

Note You need to log in before you can comment on or make changes to this bug.