Bug 144053 - man doesn't work if noclobber is set
Summary: man doesn't work if noclobber is set
Keywords:
Status: CLOSED DUPLICATE of bug 127492
Alias: None
Product: Fedora
Classification: Fedora
Component: groff
Version: 4
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-04 05:20 UTC by Paramjit Oberoi
Modified: 2013-07-02 23:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-28 12:38:55 UTC
Type: ---
Embargoed:


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

Description Paramjit Oberoi 2005-01-04 05:20:41 UTC
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):
groff-1.18.1.1-3

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 23:00:26 UTC
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 12:38:55 UTC
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.