From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 69058 invoked by alias); 21 Aug 2019 15:41:27 -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 69031 invoked by uid 89); 21 Aug 2019 15:41:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*r:authenticated, H*F:D*ne.jp, HX-Spam-Relays-External:Sendmail, H*RU:Sendmail X-HELO: conssluserg-05.nifty.com Received: from conssluserg-05.nifty.com (HELO conssluserg-05.nifty.com) (210.131.2.90) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Aug 2019 15:41:24 +0000 Received: from Express5800-S70 (ntsitm268057.sitm.nt.ngn.ppp.infoweb.ne.jp [125.1.110.57]) (authenticated) by conssluserg-05.nifty.com with ESMTP id x7LFfKDX008047 for ; Thu, 22 Aug 2019 00:41:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com x7LFfKDX008047 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1566402080; bh=8rzRqhuK6dn+9EBfeNhPdUgMhUqJFVJzMPPOxYw6R/E=; h=Date:From:To:Subject:In-Reply-To:References:From; b=XRpTIQpZoY5GJvBVUKdDgu0EIgfNC4Q3D7Th6EtR2Q5bPcfAYth01+bw9j39CLV/D OpPAJv3SE5gM7EEgYSK83BSnJgq7S1pjnZKDzEwcNvvsnwPR/2jRdcQDfXRPA+R6pl X537p1XaUBWQiMs+qNMMUePRiJToom+OSi6fdMqp1jIBlZPQKf5AY0J4RRbNWnMofX NPcJlkkB4q0vhVaVOfPmWs171VYa+mkqOnvy8cMogfzd7UFdSgjirH6x1pY9hymEig RRYihhdhQl8LtzgRezENjKGqxNZA9lTrfRYLOfno1lgfBF4msVw2XiV8WZnNiM8GTD drhwnLmyjcTAw== Date: Wed, 21 Aug 2019 15:41:00 -0000 From: Takashi Yano To: cygwin-developers@cygwin.com Subject: Re: [PATCH v7 1/1] Cygwin: pty: add pseudo console support. Message-Id: <20190822004135.ab3a5ccefbeb7c48b1a1b7ed@nifty.ne.jp> In-Reply-To: <20190819153641.582dd2314a53eac70099ae5e@nifty.ne.jp> References: <20190815160908.259-1-takashi.yano@nifty.ne.jp> <20190815160908.259-2-takashi.yano@nifty.ne.jp> <20190817083626.GA11632@calimero.vinschen.de> <20190819153641.582dd2314a53eac70099ae5e@nifty.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg00020.txt.bz2 Hi Corinna, Mark and Thomas, I worked on the following problem and implemented a solution. It is not smart enough, however, it works anyway. This is realized by hooking the WIN32 API calls which access console, and switching I/O to pseudo console side if console access is detected. I will post it as v8 patch. I'm very happy if you will test. On Mon, 19 Aug 2019 15:36:41 +0900 Takashi Yano wrote: > Hi Corinna, Mark and Thomas, > > On Sat, 17 Aug 2019 11:10:53 -0700 (PDT) > Mark Geisert wrote: > > On Sat, 17 Aug 2019, Corinna Vinschen wrote: > > > On Aug 16 01:09, Takashi Yano wrote: > > > It looks like there's some timing problem in terms of stderr output. I > > > just made up the example for the Cygwin ML discussion about the mcmodel. > > > When I start the code built with -mcmodel=small I expected the output: > > > > > > Cygwin runtime failure: /home/corinna/dll/main.exe: Invalid relocation. > > > Offset 0xfffffffd80348989 at address 0x40000103b doesn't fit into 32 bits > > > > That particular error message doesn't go out on Cygwin's stderr. It's > > done by a Windows WriteFile() on STD_ERROR_HANDLE followed by a > > FlushFileBuffers() on same. > > > > Not sure that it matters, but perhaps it does. > > Mark, you are right. > > On Thu, 15 Aug 2019 20:22:35 +0200 > Thomas Wolff wrote: > > >> The same program, compiled with cygwin gcc, fails in mintty: > > >> output is skipped (like without the patch) > > >> ↯input stalls, kill -9 fails. > > >> Without conpty patch v6, both output and input are skipped. > > >> Note that winpty properly handles this case. > > > This problem is hard to be fixed in the current implementation... > > Do you have an idea why it could make a difference whether the program > > is compiled with gcc or x86...mingw-gcc, > > even if only w32 API functions are called? > > This is also the same problem. > > The reason was already noted in: > https://cygwin.com/ml/cygwin-developers/2019-04/msg00042.html > > Now I am under consideration on this problem. > > -- > Takashi Yano -- Takashi Yano