From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-01.nifty.com (conssluserg-01.nifty.com [210.131.2.80]) by sourceware.org (Postfix) with ESMTPS id CAD6A3851C09 for ; Tue, 26 May 2020 01:01:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CAD6A3851C09 Received: from Express5800-S70 (v038192.dynamic.ppp.asahi-net.or.jp [124.155.38.192]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 04Q10nLX000812 for ; Tue, 26 May 2020 10:00:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 04Q10nLX000812 X-Nifty-SrcIP: [124.155.38.192] Date: Tue, 26 May 2020 10:00:54 +0900 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: New implementation of pseudo console support (experimental) Message-Id: <20200526100054.a251f799b4bde225edb8596b@nifty.ne.jp> In-Reply-To: <20200525152204.GF6801@calimero.vinschen.de> References: <20200513211609.011d188c3a735b00d55591df@nifty.ne.jp> <20200514182859.c5236a8889ab3081d2e8c937@nifty.ne.jp> <20200514183420.c246647a6d9e396d42c6b47e@nifty.ne.jp> <20200516092956.74369d694d611b1dcd095607@nifty.ne.jp> <20200516164735.2a2ef183788b151e9185ef41@nifty.ne.jp> <20200519224018.746f6324badd8a5762df42b1@nifty.ne.jp> <20200525195332.cf60ab2f38d167a76513740e@nifty.ne.jp> <20200525152204.GF6801@calimero.vinschen.de> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 01:01:28 -0000 On Mon, 25 May 2020 17:22:04 +0200 Corinna Vinschen wrote: > Works fine for me, but I have only a limited test scenario. Thank you very much for testing. > In terms of the remaining disadvantages: > > 3) The cygwin program which call console API directly does not work. > > I don't see a problem here. If the code below is compiled with cygwin gcc, it does not work. #include int main() { WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), "AAA\r\n", 5, NULL, 0); return 0; } However, this does not work also in cygwin 3.0.7, so it does not matter for the app which works in cygwin 3.0.7. > 4) The apps which use console API cannot be debugged with gdb. > > Do you mean Cygwin apps or native apps? I assume native apps > because of disadvantage 3... I mean native apps. If the process is executed by gdb, pseudo console is not activated since gdb use CreateProcess() rather than exec(). > Does that mean you can't even debug by attaching (via PID)? Attaching gdb to native apps, in which pseudo console is already activated, should work. > 5) Type ahead key inputs are discarded while native console app is > executed. > > Hmm, not muchg of a problem, I think. > > 7) Code page cannot be changed by chcp.com. > > I fail to see the exact drawback here. I don't think a lot of users > use chcp, but of course I could be wrong. I'd also be curious why > chcp doesn't work. Please note that pseudo console is created for each native console app in this implementation. Acctually, chcp works itself and changes code page of its own pseudo console. However, since pseudo console is recreated for another process, which does not inherit the code page. -- Takashi Yano