public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Biswapriyo Nath <nathbappai@gmail.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.3
Date: Sun, 01 Sep 2019 06:32:00 -0000	[thread overview]
Message-ID: <CALK-3mK1okwXg2by==QoHMOM-rwQvBHDj1pD9mBNCdSxPmTXHA@mail.gmail.com> (raw)
In-Reply-To: <20190831131814.2f6c9969a4380a457e61d91b@nifty.ne.jp>

To Corinna Vinschen:

> We can only use what's part of the current w32api-headers package.

I occasionally contribute to mingw-w64 repository. Is there anything I can
do so that cygwin uses latest headers and libraries from mingw-w64?

To Takashi Yano:

> Then, is it possible to DuplicateHandle() for three handles in HPCON to
other process which calls ioctl() with new HPCON?

** THE FOLLOWING PROCEDURE USES UNDOCUMENTED AND UNSTABLE CODE **

To use HPCON in another process, first cast it to a pointer of struct of
three handles as below:

    struct HPCON_INTERNAL {
        HANDLE hWritePipe;
        HANDLE hConDrvReference;
        HANDLE hConHostProcess;
    };

    HPCON hpCon;
    HRESULT hRes = CreatePseudoConsole(consoleSize, hPipePTYIn,
hPipePTYOut, 0, &hpCon);
    HPCON_INTERNAL *hpConInt = hpCon;

Then **inherit** and use hpConInt->hWritePipe to write the resize signal.
Get detail information about that buffer here[1]. Sample in my repo[2].

[1]:
https://github.com/microsoft/terminal/blob/master/src/host/PtySignalInputThread.cpp
[2]: https://github.com/Biswa96/wslbridge2/blob/master/rawpty/rawpty.cpp

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

  reply	other threads:[~2019-09-01  6:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 12:47 Corinna Vinschen
2019-08-29 16:51 ` Biswapriyo Nath
2019-08-30  8:11   ` Corinna Vinschen
2019-08-30 19:16     ` Takashi Yano
2019-08-30 20:21       ` Corinna Vinschen
2019-08-31  3:58       ` Biswapriyo Nath
2019-08-31  4:21         ` Takashi Yano
2019-09-01  6:32           ` Biswapriyo Nath [this message]
2019-09-02  8:17             ` Corinna Vinschen
2019-09-03  9:28               ` Biswapriyo Nath
2019-09-03 10:48                 ` Corinna Vinschen
2019-09-05 18:11         ` Jim Reisert AD1C
2019-09-06  2:23           ` Ken Brown
2019-09-06  5:22             ` Jim Reisert AD1C
2019-09-06 10:03 ` Thomas Wolff
2019-09-07  3:32   ` Takashi Yano
2019-09-07 11:53     ` Thomas Wolff

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='CALK-3mK1okwXg2by==QoHMOM-rwQvBHDj1pD9mBNCdSxPmTXHA@mail.gmail.com' \
    --to=nathbappai@gmail.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).