[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#949139: xterm: ls --color with errors piped to less sometimes corrupts the xterm status (split escape sequences)



Package: xterm
Version: 351-1
Severity: normal

I've run the equivalent of ls with some options including --color
piped to less with the -R option, and after quitting less, the
xterm status sometimes get corrupt, apparently due to some margin
set up.

I've attached the xterm output log, but I can notice that an escape
sequence (sent to stdout) has been split by some error message (sent
to stderr):

  mcryptsetup^[[0m/^[ls: cannot open directory

where ^[ is the ESC character, and after the error messages, one has
"[m" corresponding to the end of the escape sequence.

The terminal should make sure that escape sequences from some FD are
not split by data coming from another FD.

This is not reproducible only with xterm, not with other terminals,
such as rxvt and gnome-terminal (but perhaps the race occurs
differently).

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.4.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=POSIX (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages xterm depends on:
ii  libc6           2.29-9
ii  libfontconfig1  2.13.1-2+b1
ii  libfreetype6    2.10.1-2
ii  libice6         2:1.0.9-2
ii  libtinfo6       6.1+20191019-1
ii  libutempter0    1.1.6-4
ii  libx11-6        2:1.6.8-1
ii  libxaw7         2:1.0.13-1+b2
ii  libxext6        2:1.3.3-1+b2
ii  libxft2         2.3.2-2
ii  libxinerama1    2:1.1.4-2
ii  libxmu6         2:1.1.2-2+b3
ii  libxpm4         1:3.5.12-1
ii  libxt6          1:1.1.5-1+b3
ii  xbitmaps        1.1.1-2

Versions of packages xterm recommends:
ii  x11-utils  7.7+4

Versions of packages xterm suggests:
pn  xfonts-cyrillic  <none>

-- no debconf information

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Attachment: Xterm.log.zira.2020.01.17.11.25.53.1500430.xz
Description: Binary data


Reply to: