From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23206 invoked by alias); 6 Apr 2019 17:43:44 -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 23197 invoked by uid 89); 6 Apr 2019 17:43:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-102.4 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=screen, HCc:D*cygwin.com, H*F:D*cygwin.com X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.135) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 06 Apr 2019 17:43:43 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MzTCy-1gzRIv03uq-00vSKs; Sat, 06 Apr 2019 19:43:37 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 6E6C7A803FD; Sat, 6 Apr 2019 19:43:35 +0200 (CEST) Date: Sat, 06 Apr 2019 17:43:00 -0000 From: Corinna Vinschen To: Takashi Yano Cc: cygwin-developers@cygwin.com Subject: Re: [PATCH v3 0/1] Pseudo console support in PTY (v3) Message-ID: <20190406174335.GC4248@calimero.vinschen.de> Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: Takashi Yano , cygwin-developers@cygwin.com References: <20190404104606.GA24725@calimero.vinschen.de> <20190406111308.1822-1-takashi.yano@nifty.ne.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="opJtzjQTFsWo+cga" Content-Disposition: inline In-Reply-To: <20190406111308.1822-1-takashi.yano@nifty.ne.jp> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-04/txt/msg00023.txt.bz2 --opJtzjQTFsWo+cga Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2806 Hi Takashi, On Apr 6 20:13, Takashi Yano wrote: > The major changes from v2 is as follows. >=20 > (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. >=20 > (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. This looks better, but there's still some problem: $ cygport gawk.cygport build >>> Compiling gawk-4.2.62-1.x86_64 [pressing Ctrl-C multiple times] 14 [main] chmod (7016) child_copy: cygheap read copy failed, 0x1803764= 08..0 x1803887A8, done 0, windows pid 7016, Win32 error 299 766 [main] chmod (7016) C:\cygwin64\bin\chmod.exe: *** fatal error - cc= alloc would have returned NULL 14 [main] chmod (7016) child_copy: cygheap read copy failed, 0x1803764= 08..0x1803887A8, done 0, windows pid 7016, Win32 error 299 766 [main] chmod (7016) C:\cygwin64\bin\chmod.exe: *** fatal error - cc= alloc would have returned NULL I can reproduce this pretty easily, 1 out of 5 or so. Since I wasn't sure this is really your patch, I checked again without your patch but I can't get it to fail like this. > (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. >=20 > (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. Apart from the above problem, this looks good from what I see in my testing. Tell me as soon as you're confident enough with your code to push it to master. Even if there are still bugs, it allows to test this with a slightly bigger audience via the developer snapshots. But that's your choice, no pressure from my side. Thanks, Corinna --=20 Corinna Vinschen Cygwin Maintainer --opJtzjQTFsWo+cga Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlyo5UcACgkQ9TYGna5E T6B9AA//RqwGgKQrTIdB+Zl+YSyoHdskY+ryKiXkk0Jcx5i51e5FkQJMlTaeUkS3 v/lNByFpjiUz+O+UANtgw6IYvn00Xuqga52BNXqKhGFGKvmRyfvEhxpnZniZ3ENa 0c+xK/ykOb7zrVmx/JNXdAgoGBnoB8UlTArnrHUVDtSeXVYfEEZIHWyKdnpD0VJ9 NVXk6v2I/X5Dx/LcfO8Hw80LFRN8CH8U45S+q29WX9jEAO2kpbfiopR4Bz5kEAyc O0ZqBeHzuJ/PRz9RpsE9OZT15hD8Kv8Ay0t6cJdzUPl+75+F1k72mFmsFaCiY1CU oKdyPD4SRBrC7tXqGf8NOBzFif4AKhHzQLbanGZ4WoHnZWr09r3p8mt0EGscrzyx QKdob+75d5G8xkBLgWnEchCzj/hYYVwQwvZ8pWMjoAn69LhBoKX0L0PaGxn5AxX3 rCEohl4W1l5rADQfaPFtJ/cbSUh8nAM+XfXIn5Nm/Ql7WHr5BzmpuRmP2JKtk8UV 9znKiluV/wX2ZYkdFHH6tWEu1ewfT9z1CdAHYNaafmj99hxGC0hR8A6mUaAMkvKy b6iVgGm+UlPXLa9am1Ij0XsAVk6ZN4WMgiRjj185JX1fZAbriSnRno1XUib8qE+4 UhDN1CL8d+8fvcBZ5xs8Cz675dGlmUGbQEVikcfYGJ9+/i0xBts= =OLX0 -----END PGP SIGNATURE----- --opJtzjQTFsWo+cga--