delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/03/19/08:58:50

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F516386F416
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1616158727;
bh=aA2XVXhJfjwdsfrxlKaNpG5t5zbndO7EMZTXSpcUx/Q=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=hBfLeqGjnFexEcO/OO1fEAdCdSqMDKkt1yEQq1GTW4r9ebZdN17GFMG0VgL+qYjNr
RI56Es7jYgGR0OaREGOOtWlFhn9gWqiCKsKEELEIGQYErI2vq8TqV2obv+9UVusfMY
p1Io8KW7jztKxxHH6/tAx2Ch2PvSKedUGbQ4kW5M=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4C689386102F
Date: Fri, 19 Mar 2021 13:58:40 +0100
To: cygwin AT cygwin DOT com
Subject: Re: stdin pipe rename in 3.2.0
Message-ID: <YFSgAJdS7uSp/NwM@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAE6_+Uc6rfDPTpOpkLGjn5G9HS77qvHWcEpOOepmC962vbgMmw AT mail DOT gmail DOT com>
<20210319190807 DOT babb0c0312740f44e9119c17 AT nifty DOT ne DOT jp>
<20210319210546 DOT a1871ac954d695bceaeb079b AT nifty DOT ne DOT jp>
MIME-Version: 1.0
In-Reply-To: <20210319210546.a1871ac954d695bceaeb079b@nifty.ne.jp>
X-Provags-ID: V03:K1:L/4k0K8Eo+Mg+phwM5g9gf++YAdY2NFYt/6v74hPokJpOeFm0IO
cZ7UpnpoDMeAV/fqyYjskh8GQp0C05zKX0wtsA6UTZdW1Ql2MpekNJB0cAhn14JMc6I48YD
f88gD7yMYROYavF4aYIT3E0uKirKsmVPxYIhlyqKghlE4RfthB0b7vhYEp5lwOzF1k8OW8V
EyfQ8g4THFeE47eUXpsRA==
X-UI-Out-Filterresults: notjunk:1;V03:K0:FO0FU7nnEag=:71uDuVwZVUlDEvQkGyrKOr
PflQ0Q8AJiWU7jCiXwJqfIDVyI1OlRdsodJcP2FhXk1qMmDX15x56kXQXKZC/VV+FMr28KDbr
NFLJm6t3kRx3zsWtdSH6kac16YPBKzxkxCWBD9cwfLVZTzxHjbDoBxi8aCtVMSmZWQ5+sdbkc
dl+svrMFN/bpxkdbQqBmaCcnBbadNDd5u5nc7NQxaWFrVPLd+kh1sbY+iIgPxKtOhdMr/9ovc
23QCSYyql/Sv5t4xeqJBJ4SZa6I/KcQZE8egWGhYykvAfjYyXoMnj7Ed9Wwk9vR+fiyZAFmfF
I92mXyCsL8or/IpZ7zJwzVMEDQwDs+1Vc1sBd/wjS+c2Yvj4WCHFLWhTYJb7X5YwquCFRo+8q
j6QFcfpilIHkGEdGLLc1ZB+3NpbRJ/5xEt1FhQkQFn4IBfsKaN8rhuDp5qBTu/Wd9BvgGmWom
WnaTQ4iXYg==
X-Spam-Status: No, score=-100.8 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS,
KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NEUTRAL,
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 AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On Mar 19 21:05, Takashi Yano via Cygwin wrote:
> On Fri, 19 Mar 2021 19:08:07 +0900
> Takashi Yano wrote:
> > Corinna, is it possble to apply the patch for 3.2.0 release?

That's what release testing is for :)

> By the way, duaring testing https://github.com/k-takata/ptycheck,
> I noticed _get_osfhandle() does not work properly for stdout and
> stderr. Shouldn't this
> 
> extern "C" long
> _get_osfhandle (int fd)
> {
>   long res;
> 
>   cygheap_fdget cfd (fd);
>   if (cfd >= 0)
>     res = (long) cfd->get_handle ();
>   else
>     res = -1;
> 
>   syscall_printf ("%R = get_osfhandle(%d)", res, fd);
>   return res;
> }
> 
> be
> 
> extern "C" long
> _get_osfhandle (int fd)
> {
>   long res;
> 
>   cygheap_fdget cfd (fd);
>   if (cfd >= 0)
>     {
>       if (fd == 1 || fd == 2)
>         res = (long) cfd->get_output_handle_cyg ();
>       else
>         res = (long) cfd->get_handle_cyg ();
>     }
>   else
>     res = -1;
> 
>   syscall_printf ("%R = get_osfhandle(%d)", res, fd);
>   return res;
> }
> 
> ?

Maybe.  You introduced the "_cyg" handles, so you should know ;)

On a more serious note, this is, of course, a compatibility
problem.  While _get_osfhandle is called by a Cygwin application,
nobody knows what dubious actions that application will perform
on this handle.  In all likelyhood, it fetched the handle to call
Windows functions.  And *if* it does, wouldn't it make more sense
if the non-Cygwin handle is returned?


Thanks,
Corinna
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019