#17 pstree renders terminal unusable sometimes

open
nobody
None
5
2012-09-18
2005-05-05
No

This is a bad incarnation of
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265553

As said there:

psmisc generates a line including escape sequences,
and then truncates it to fit in the width of the screen. It
adds this "+" to indicate the line was chopped. Since it
doesn't take the escape sequences into account, the
lines are often truncated at much shorter than
$COLUMNS displayable characters, and also it could
chop a line in the middle of an escape sequence

If that happens while pstree outputs line-drawing characters
in the last output line, the terminal becomes unusable. See
the attached typescript. Relevant environment variables:

LANG=ru_RU.KOI8-R
TERM=xterm

The version of NCurses is 20050319. xterm is started as
"LANG=ru_RU.KOI8-R xterm -lc"

Discussion

  • Alexander E. Patrakov

    Broken typescript

     
  • Craig Small

    Craig Small - 2005-09-09

    Logged In: YES
    user_id=21630

    I'm trying to find a nice way of pstree detecting this sort
    of terminal and doing the right thing. I suspect the REAL
    fix is to remove the hard-coded evilness that does the line
    drawing characters and make proper curses calls.

     
  • Alexander E. Patrakov

    Logged In: YES
    user_id=1037618

    Actually, I'd prefer dropping the code that draws lines
    using escape sequences. It's just too buggy.

     
  • Nobody/Anonymous

    Logged In: NO

    http://bugs.debian.org/288856 is a duplicate of this

     
  • Craig Small

    Craig Small - 2006-05-28

    Logged In: YES
    user_id=21630

    a work-around is in place for 21.7 onwards, it will default
    to ASCII type.

     

Anonymous
Anonymous

Cancel  Add attachments