delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/02/08/07:14:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; q=dns; s=default; b=geMRIAp7qQk+q33wRR13IfU/BKRf9
ntBiFjuofED0x4IG731d2R6YCIWAY6nu0LYoDhlaa2eBpVThti4Cfv44oUHqzzLF
M26iMmvaAQdw3L75Ld8ZDCAoU8RvAkzSgGbAMLDEUUqoSgVK7PAkpyoJKUq3VPPP
xSePMnwzpmGPts=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:from:date:message-id:subject:to
:content-type; s=default; bh=abotjsuERHJ4Y461V2iNDsjXIQc=; b=JVj
e9+bx+LsEX5qBF9rzyD6dpuBGkYExEYWyHrH70+xsamndULP8oldx8NPxAurXZBR
80QdNUxcA4pwMZqUn5bWrrrjorIRso+RoI89wGFZg23GYfolRNzgpL767L/dunV5
HBBHilqBA76PvOJmDDUk1Z5WJYjxBmfufGu2JWcM=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Screen, faced, Mintty, ESC
X-HELO: mail-lj1-f180.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=SuHED0gZan+pL35otyzw9bAAzzVNVrOGU5D3VYI2IpI=; b=plYuSqiVT9zlSeofP+WITGwZnHt2ZnxQn2Kwzy99g+ZBzBdADX1Y9eJ3tabstVllF5 hkbAQjkJ7jr8+DoOFvRVBr3Ek8Q1N+0f6/CDLB96LEqnErUP+a5curvxICBrTn1ny7X6 u4J4oNq8SjBsc0tMnNHNIOdVN/a4K40GqORWkGvUSZ7n/VpNZ30XYTtdIPVmrA9aEX9v kTVIdVo1z628YAojw7uBjRhE+FdnewGI0o6IG6wn7ytdCU9u0TwrMiOFpMJbahLNp7li BiFbjCOg6Fp/wnTNxoW9IYsH6DibmS/px8T73tfjCQYw+/byTtd2SOw6IxeEaqRCz7nC miyg==
MIME-Version: 1.0
From: Koichi Murase <myoga DOT murase AT gmail DOT com>
Date: Sat, 8 Feb 2020 20:13:09 +0800
Message-ID: <CAFLRLk-GK_kCL6Wdf=TSR-fNwsuf3BDv-C465S6RFX0hNRqQFw@mail.gmail.com>
Subject: Cygwin-3.1.3: Terminal contents are overwritten by less graphical ones on the start of non-Cygwin programs
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hi, this is another report related to the pseudo console.

Description:

  When a non-Cygwin program is started for the first time in that PTY
  in terminal emulators such as Mintty, Xterm, Urxvt and GNU Screen,
  the terminal contents are overwritten by less graphical ones.  I
  guess that the contents of the internal pseudo console (which is
  constructed in the background) is somehow output and overwrites the
  original contents of those functional terminal emulators.

  This is reproduced with the latest snapshot and also with the latest
  commit 3a71c4638.

Repeat-By:

  Open Mintty or Xterm and run the following commands (with Bash):

  $ x86_64-w64-mingw32-gcc -xc - -o nocyg.exe <<< 'main(){}'
  $ printf '\e[%smhello\e[m\n' {0..9}
  $ ./nocyg.exe

  With the first line, the simplest non-Cygwin program is compiled.
  With the second line, "hello" is printed with various graphic
  styles.  However, when one runs a non-Cygwin command in the third
  line, those graphic styles are reset (i.e., overwritten by contents
  of a less functional terminal).

Details:

* If I start Mintty or Xterm with the environment variable
  `CYGWIN=disable_pcon', the problem does not occur.

* Before the commit `e38f2dc9b' (Cygwin: pty: Revise code waiting for
  forwarding again.), this occured every time a non-Cygwin command is
  executed.  But after the commit, this only occurs for the first
  execution of any non-Cygwin program in that PTY session.

* The problem is not restricted in just clearing graphic styles of
  characters.  For GNU Screen I use Screen-specific terminal sequences
  "ESC k ... ST" in my shell prompt to set the title of each window.
  But the overwriting contents seem to be constructed by another
  terminal which does not recognize this terminal sequence.  As a
  results, the layout of terminal contents after the non-Cygwin
  program is completely broken.  The problem should occur with any
  other functionalities which are supported by modern terminal
  emulators but not by pseudo console.

* As well as non-Cygwin programs, also Cygwin programs `ssh', `scp' or
  `git push/pull' with SSH connections cause the same results.  I
  guess SSH utilities internally use non-Cygwin programs.  (Actually I
  originally faced with this problem with these "Cygwin" commands.)


Best regards,

Koichi

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019