From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: stdin pipe rename in 3.2.0
Date: Fri, 19 Mar 2021 13:58:40 +0100 [thread overview]
Message-ID: <YFSgAJdS7uSp/NwM@calimero.vinschen.de> (raw)
In-Reply-To: <20210319210546.a1871ac954d695bceaeb079b@nifty.ne.jp>
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
next prev parent reply other threads:[~2021-03-19 12:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 20:28 Christoph Reiter
2021-03-19 3:46 ` Brian Inglis
2021-03-19 7:53 ` Christoph Reiter
2021-03-19 11:30 ` Brian Inglis
2021-03-19 10:08 ` Takashi Yano
2021-03-19 10:16 ` Takashi Yano
2021-03-19 11:17 ` Christoph Reiter
2021-03-19 12:05 ` Takashi Yano
2021-03-19 12:58 ` Corinna Vinschen [this message]
2021-03-21 3:59 ` Takashi Yano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YFSgAJdS7uSp/NwM@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).