X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C39EE386F41E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1616155568;
	bh=Bh8VvFlIy5FtAAJS7mlB9a9CmaMdY4H4sj59G9iP5LA=;
	h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
	 From;
	b=clwSsLLPEkitPA4zoFd7de4M1zacgCOyTShDMQJsPzVnVD0iMnwcJ5mmA+byIhRnU
	 JmiZ0rX4ZhgYPlPRB3OTgyx2gid4EgTNwecMbMsG4XJLxgDUp43xZzFy+blU4vHTSX
	 tYOafU08spslsd3Ic0Ie0Nuk0U1uC/BGlma2lkK4=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C99BC385041E
DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 12JC5iBI004672
X-Nifty-SrcIP: [118.243.84.61]
Date: Fri, 19 Mar 2021 21:05:46 +0900
To: cygwin@cygwin.com
Subject: Re: stdin pipe rename in 3.2.0
Message-Id: <20210319210546.a1871ac954d695bceaeb079b@nifty.ne.jp>
In-Reply-To: <20210319190807.babb0c0312740f44e9119c17@nifty.ne.jp>
References: <CAE6_+Uc6rfDPTpOpkLGjn5G9HS77qvHWcEpOOepmC962vbgMmw@mail.gmail.com>
 <20210319190807.babb0c0312740f44e9119c17@nifty.ne.jp>
X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
Mime-Version: 1.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A,
 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@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Takashi Yano via Cygwin <cygwin@cygwin.com>
Reply-To: Takashi Yano <takashi.yano@nifty.ne.jp>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>

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?

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;
}

?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>
--
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
