From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-04.nifty.com (conssluserg-04.nifty.com [210.131.2.83]) by sourceware.org (Postfix) with ESMTPS id D00BB385701F for ; Tue, 23 Mar 2021 12:32:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D00BB385701F Received: from Express5800-S70 (ae236159.dynamic.ppp.asahi-net.or.jp [14.3.236.159]) (authenticated) by conssluserg-04.nifty.com with ESMTP id 12NCWBit020409 for ; Tue, 23 Mar 2021 21:32:11 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 12NCWBit020409 X-Nifty-SrcIP: [14.3.236.159] Date: Tue, 23 Mar 2021 21:32:12 +0900 From: Takashi Yano To: cygwin-patches@cygwin.com Subject: Re: [PATCH 0/2] Return appropriate handle by _get_osfhandle() and GetStdHandle(). Message-Id: <20210323213212.d2c5a9e7db7a508260693998@nifty.ne.jp> In-Reply-To: References: <20210321040126.1720-1-takashi.yano@nifty.ne.jp> <20210321174427.cf79e39deeea896583caa48c@nifty.ne.jp> <20210322080738.6841d7f2a1e09290a929ad90@nifty.ne.jp> <58c7be6c-42db-cc09-9f89-461ac7c87747@cornell.edu> <20210323205717.bf5c3a41695871ec70bf1229@nifty.ne.jp> 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=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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-patches@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component patch submission and discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 12:32:44 -0000 On Tue, 23 Mar 2021 13:17:16 +0100 Corinna Vinschen wrote: > On Mar 23 20:57, Takashi Yano via Cygwin-patches wrote: > > Corinna Vinschen wrote: > > > > > On Mar 22 08:07, Takashi Yano via Cygwin-patches wrote: > > > > > > > And also, following cygwin apps/dlls call GetStdHandle(): > > > > > > > ccmake.exe > > > > > > > cmake.exe > > > > > > > cpack.exe > > > > > > > ctest.exe > > > > > > > run.exe > > > > > > run creates its own conin/conout handles to create a hidden console. > > > The code calling GetStdHandle() is only for debug purposes and never > > > built into the executable. > > Sorry, but this was utterly wrong. run calls GetStdHandle, then > overwrites the handles, but only if it doesn't already is attached to a > console. > > > > Looks right to me. If we patch cmake to do the right thing, do we still > > > need this patch, Takashi? > > > > I don't think so. If all is well with current code, nothing to be fixed. > > How do you evaluate this in light of the run behaviour above? I try to check run.exe behaviour and noticed that run cmd.exe and run cat.exe does not work with cygwin 3.0.7 and 3.2.0 (TEST) while these work in 3.1.7. Is this expected behaviour? -- Takashi Yano