From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111375 invoked by alias); 30 Mar 2019 23:07:18 -0000 Mailing-List: contact cygwin-developers-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com Received: (qmail 111359 invoked by uid 89); 30 Mar 2019 23:07:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,URIBL_BLOCKED autolearn=ham version=3.3.1 spammy=slowdown, H*r:Sun, screen, adaptive X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (217.72.192.75) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 30 Mar 2019 23:07:16 +0000 Received: from [192.168.178.45] ([95.91.242.222]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MhDAi-1gW4At2gfC-00ePUg for ; Sun, 31 Mar 2019 00:07:13 +0100 Subject: Re: Pseudo console support in PTY To: cygwin-developers@cygwin.com References: <20190330220804.a3be5fa8c4d5569464309d66@nifty.ne.jp> From: Thomas Wolff Message-ID: <0f15049e-5b71-d9dd-434a-dcc4c1801b92@towo.net> Date: Sat, 30 Mar 2019 23:07:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190330220804.a3be5fa8c4d5569464309d66@nifty.ne.jp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00009.txt.bz2 Am 30.03.2019 um 14:08 schrieb Takashi Yano: > Hello cygwin developers, > > I have worked on implementing pseudo console support into cygwin > PTY by request from Corinna. Pseudo console is a new feature > after Windows 10 1809, which provides console APIs on virtual > terminal. > https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/ > https://docs.microsoft.com/en-us/windows/console/creating-a-pseudoconsole-session > > After much effort, it began to work partially. So, I would > like to announce to this mailing list. Attached are the > patchs against cygwin git HEAD. > > ... > > Patch 0003: Support pseudo console in PTY. With this patch, > native console applications can work in PTY such as mintty, > ssh, gnu screen or tmux. This will be great to have in cygwin. > Anyone who are interested in this work, please test. Any > discussions and suggestions are also welcome. I had previously (before ConPTY was announced) suggested a patch to inject winpty as a wrapper, for more or less the same purpose, to integrate non-cygwin applications seamlessly in pty-based terminals (https://cygwin.com/ml/cygwin-developers/2018-04/msg00002.html). While the patch did not proceed because winpty was reported to fail in certain settings, I could demonstrate it was sufficient to inject the pty interaction gateway only when actually running a console application (non-cygwin program), and handle that all in spawn.cc. So I am wondering whether your patch is maybe doing "too much", and why e.g. fhandler_console should be modified, as there is no need for such adaptive handling when running a console application in a console, even through cygwin. > Known problems: > * Sometimes the screen layout would be broken. If you describe the issues, I'll be glad to try some analysis. > * mintty fails to start if it is started in console cygwin session. If you limit the usage to running non-cygwin console apps, there is no need for any slowdown in a terminal when running cygwin apps. Corinna wrote: > This is all pretty exciting. Yes, and I'd suggest Takashi for a gold star already, once this works. Thomas