Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Sep 2021 15:59:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 258409] top(1) outputs no processes when TERM is not set
Message-ID:  <bug-258409-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258409

            Bug ID: 258409
           Summary: top(1) outputs no processes when TERM is not set
           Product: Base System
           Version: 12.2-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: freqlabs@FreeBSD.org

We capture the output of top -SHIwz -d 2 in a debug script, but there are no
processes shown. The lines for the processes are all blank.

Upon investigation, this only occurs when TERM is not set in the environmen=
t.
This can be easily reproduced:

$ env TERM=3Ddumb top -SHIwz -d 2 | cat

Processes are listed.

$ env -u TERM top -SHIwz -d 2 | cat

Blank lines are displayed where processes should be listed.

We are working around this issue with -n to force non-interactive mode, but=
 it
would be good to fix top since screen_width =3D 0 doesn't seem like it woul=
d ever
be what someone actually wants.

I've reproduced this on 12 13 and CURRENT.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-258409-227>