From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9172 invoked by alias); 8 Feb 2020 12:13:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 9160 invoked by uid 89); 8 Feb 2020 12:13:23 -0000 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 Received: from mail-lj1-f180.google.com (HELO mail-lj1-f180.google.com) (209.85.208.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 12:13:22 +0000 Received: by mail-lj1-f180.google.com with SMTP id o15so2106529ljg.6 for ; Sat, 08 Feb 2020 04:13:21 -0800 (PST) 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 Date: Sat, 08 Feb 2020 12:13:00 -0000 Message-ID: Subject: Cygwin-3.1.3: Terminal contents are overwritten by less graphical ones on the start of non-Cygwin programs To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00062.txt.bz2 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