From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81484 invoked by alias); 6 Apr 2019 11:13:45 -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 81475 invoked by uid 89); 6 Apr 2019 11:13:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_05,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=cygwincom, UD:cygwin.com, cygwin.com, H*Ad:D*ne.jp X-HELO: conuserg-01.nifty.com Received: from conuserg-01.nifty.com (HELO conuserg-01.nifty.com) (210.131.2.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 06 Apr 2019 11:13:41 +0000 Received: from localhost.localdomain (ntsitm424054.sitm.nt.ngn.ppp.infoweb.ne.jp [219.97.74.54]) (authenticated) by conuserg-01.nifty.com with ESMTP id x36BDPge003072; Sat, 6 Apr 2019 20:13:34 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-01.nifty.com x36BDPge003072 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1554549214; bh=vr4Sy5ovDer+nXQ5EMLq2116Ja+TEOhy6InzRCj3FHI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=APyiUYvRrN7NjhqujNh8QEDScQTSPbEBHsF72x/kkyX+Bf6LS2/+BYBBKV+coT3EX 4I89Lmu//Qm2HvRbghKQ8nqJYMbmY1NNthaLscsGYc7iGDakMETWh0jjvm+hOKFTNT pqg8q/ikReGNFz5aVqAJ1gjsGa/XJuMRsOeF+CH2/nNzzvxsiPn3rOWurJl/Vt0EHv X9ts583FajLuzzdJXGfy0RntqFvUlszr+0x1tAGg4zOyXunOrjm7xJBUnk9hTMUCun H46g5BnxdZQQtzpmDIpWBZ2salvPaKjAAthLtupE8ohvn5K5sFVM7A+MaC2i2xO4ny 4PaMY4uJFzObg== From: Takashi Yano To: cygwin-developers@cygwin.com Cc: Takashi Yano Subject: [PATCH v3 0/1] Pseudo console support in PTY (v3) Date: Sat, 06 Apr 2019 11:13:00 -0000 Message-Id: <20190406111308.1822-1-takashi.yano@nifty.ne.jp> In-Reply-To: <20190404104606.GA24725@calimero.vinschen.de> References: <20190404104606.GA24725@calimero.vinschen.de> X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00021.txt.bz2 The major changes from v2 is as follows. (1) I dig into this problem, https://www.cygwin.com/ml/cygwin-developers/2019-04/msg00000.html and adoptted another approach. Slave process is left unattached by some reason if the executable is a windows GUI binary, such as mintty. So the code is added in stdio_init() in dtable.cc, which makes slave attach to pseudo console and fix up handles, if the slave is on pty but not attached. The previous approach, which uses fhandler_console::need_invisible(), has a side effect that the mintty looks running on cons*, although it actually has no TTY. (2) The ctrl-C issue reported in https://cygwin.com/ml/cygwin-developers/2019-04/msg00012.html has been fixed. This seems to be caused by race condition of a variable, switch_to_pcon. This variable holds the state for switching I/O between pseudo console for native console apps and conventional pty for cygwin apps. The handling of this variable is refined. I suppose the issue is fixed in v3. (3) Code page handling is refined a bit. Now, code page 65001 (UTF8) and native code page in your region should work without garbled characters. This works properly only on terminal which supports UTF-8. (4) Synchronization between real terminal and pseudo console screen buffer is improved. For this, screen is cleared on startup of pty slave app. Also echo for key input is pushed into pseudo console screen buffer. By (4), On Sat, 30 Mar 2019 22:08:04 +0900 Takashi Yano wrote: > Known problems: > * Sometimes the screen layout would be broken. is almost resolved. D=http://tyan0.dip.jp/cygwin ${D}/x86_64/test/cygwin1-20190406.dll.xz ${D}/x86_64/test/cygwin-console-helper.exe.xz ${D}/x86/test/cygwin1-20190406.dll.xz ${D}/x86/test/cygwin-console-helper.exe.xz Takashi Yano (1): Cygwin: pty: add pseudo console support. winsup/cygwin/dtable.cc | 57 +++ winsup/cygwin/fhandler.h | 46 +- winsup/cygwin/fhandler_console.cc | 32 ++ winsup/cygwin/fhandler_tty.cc | 610 ++++++++++++++++++++++++-- winsup/cygwin/fork.cc | 20 + winsup/cygwin/select.cc | 22 +- winsup/cygwin/spawn.cc | 32 ++ winsup/cygwin/tty.cc | 5 + winsup/cygwin/tty.h | 21 +- winsup/utils/cygwin-console-helper.cc | 14 +- 10 files changed, 816 insertions(+), 43 deletions(-) -- 2.17.0