Issues with pstree

Alexander E. Patrakov alexander at linuxfromscratch.org
Sat Jun 4 22:53:17 PDT 2005


(Sorry for possible duplicate, the smarthost in USU seems to have marked
my original message as SPAM or is just broken. I think I will eventially
have to move to some other E-Mail address, not related with USU).

Hello,

psmisc-21.6 has several issues in the pstree program:

1) In non-ISO-8859-1 8-bit locales on Linux console, pstree sends the
\033(0 escape sequence to the terminal. This means "Use ISO-8859-1
translation table" and therefore breaks the display of all national
characters after running pstree. (echo -e '\033(K' is the fix).

2)
http://sourceforge.net/tracker/index.php?func=detail&aid=1195650&group_id=15273&
atid=115273

Issue (1) is critical, since it makes pstree completely unusable on
Linux console in all non-ISO-8859-1 8-bit locales. Issue (2) is also
important, since it can turn the terminal session into garbage in any
locale (but, as opposed to (1), it is triggered rarely).

I have not noticed (1) for a long time because I always start KDM and
almost never work in the linux console. My fault.

One possible solution is to put a warning in the description of pstree
in the LFS book, i.e. "don't use this program on linux console in
non-ISO-8859-1 locales - it will break the display of national characters".

Another solution is to patch pstree.

I have attached two patches to psmisc, please choose one of them or
both. The -1a patch just disables the use of VT100 line drawing
characters by default and thus avoids these two bugs and some others.
The -1b patch attempts to fix those two bugs, but I cannot call the fix
100% correct for xterm (it relies upon the undocumented fact that xterm
ignores the "\033(K" sequence). The -1a patch is IMHO a safer solution.

Please choose which of the solutions should go into LFS-6.1.

-- 
Alexander E. Patrakov

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: psmisc-21.6-acsc-1a.patch
URL: <http://lists.linuxfromscratch.org/pipermail/patches/attachments/20050605/8ab973d5/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: psmisc-21.6-acsc-1b.patch
URL: <http://lists.linuxfromscratch.org/pipermail/patches/attachments/20050605/8ab973d5/attachment-0001.ksh>


More information about the patches mailing list