Bug 130517

Summary: top -bn1 no longer ignores $TERM
Product: [Fedora] Fedora Reporter: Jamie Zawinski <jwz>
Component: procpsAssignee: Karel Zak <kzak>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-06-27 15:07:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jamie Zawinski 2004-08-20 23:04:34 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2)
Gecko/20040803

Description of problem:
"top -bn1" should produce plain-text output and exit.  It does not
address the screen, and so should not consult $TERM.  In 2.0.11, it
did not, but in 3.2.0 it does.

With procps-2.0.11-6 on Red Hat 9:

     % setenv TERM no-such-terminal-type
     % top -bn1 | head
       (works)

With procps-3.2.0-1.1 on Fedora Core 2:

     % setenv TERM no-such-terminal-type
     % top -bn1 | head
     'no-such-terminal-type': unknown terminal type.

     % setenv TERM dumb
     % top -bn1 | head
       (works)

So, even though top does not make use of the terminal entry, it
insists on there being one anyway.

This is a problem because Emacs *shell* buffers set $TERM to "emacs",
which has no termcap entry, so when I do top-ish grep-ish things in
Emacs, I have to screw around with $TERM to make it work.

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

How reproducible:
Always

Expected Results:
"top -bn1" should work the same regardless of the $TERM setting.

Comment 1 Daniel Walsh 2004-08-30 20:04:19 UTC
Fixed in procps-3.2.3-3