Bug 144053 - man doesn't work if noclobber is set
man doesn't work if noclobber is set
Status: CLOSED DUPLICATE of bug 127492
Product: Fedora
Classification: Fedora
Component: groff (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Jindrich Novy
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-01-04 00:20 EST by Paramjit Oberoi
Modified: 2013-07-02 19:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-04-28 08:38:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
adds set +o noclobber to script (334 bytes, patch)
2005-03-07 18:00 EST, Joshua Buysse
no flags Details | Diff

  None (edit)
Description Paramjit Oberoi 2005-01-04 00:20:41 EST
Description of problem:
man uses /usr/bin/nroff to render man pages.  nroff creates a temporary file, and then 
redirects some output to that file (/usr/bin/nroff, line 50).  The redicretion fails if the 
"noclobber" option is set.  This leads to the pager displaying an empty document.

Version-Release number of selected component (if applicable):

How reproducible:
Type the following commands in a bash shell:

    $ echo "set -o noclobber" > zzz
    $ BASH_ENV="`pwd`/zzz" man man

Actual results:
less will display an empty file.  No errors are reported.

Expected results:
less displays the man page.

Additional info:
Proposed fix: change the offending line as follows:

old: cat ${1+"$@"} > ${TMPFILE}
new: cat ${1+"$@"} >| ${TMPFILE}

The >| operator forces redirection even if noclobber is set.
Comment 1 Joshua Buysse 2005-03-07 18:00:26 EST
Created attachment 111761 [details]
adds set +o noclobber to script

This is an alternate patch, quick and dirty.  Alternately could be done as the
original submitter proposed.
Comment 2 Jindrich Novy 2005-04-28 08:38:55 EDT
Yes, the change from > to >| seems to be as the simplest solution to this issue.
Thanks for the patch anyway.

*** This bug has been marked as a duplicate of 127492 ***

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