public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-developers@cygwin.com
Subject: Re: [PATCH v7 1/1] Cygwin: pty: add pseudo console support.
Date: Wed, 21 Aug 2019 15:41:00 -0000	[thread overview]
Message-ID: <20190822004135.ab3a5ccefbeb7c48b1a1b7ed@nifty.ne.jp> (raw)
In-Reply-To: <20190819153641.582dd2314a53eac70099ae5e@nifty.ne.jp>

Hi Corinna, Mark and Thomas,

I worked on the following problem and implemented a solution.
It is not smart enough, however, it works anyway. This is
realized by hooking the WIN32 API calls which access console,
and switching I/O to pseudo console side if console access is
detected.

I will post it as v8 patch. I'm very happy if you will test.

On Mon, 19 Aug 2019 15:36:41 +0900
Takashi Yano wrote:
> Hi Corinna, Mark and Thomas,
> 
> On Sat, 17 Aug 2019 11:10:53 -0700 (PDT)
> Mark Geisert wrote:
> > On Sat, 17 Aug 2019, Corinna Vinschen wrote:
> > > On Aug 16 01:09, Takashi Yano wrote:
> > > It looks like there's some timing problem in terms of stderr output.  I
> > > just made up the example for the Cygwin ML discussion about the mcmodel.
> > > When I start the code built with -mcmodel=small I expected the output:
> > >
> > > Cygwin runtime failure: /home/corinna/dll/main.exe: Invalid relocation.
> > > Offset 0xfffffffd80348989 at address 0x40000103b doesn't fit into 32 bits
> > 
> > That particular error message doesn't go out on Cygwin's stderr.  It's 
> > done by a Windows WriteFile() on STD_ERROR_HANDLE followed by a 
> > FlushFileBuffers() on same.
> > 
> > Not sure that it matters, but perhaps it does.
> 
> Mark, you are right.
> 
> On Thu, 15 Aug 2019 20:22:35 +0200
> Thomas Wolff wrote:
> > >> The same program, compiled with cygwin gcc, fails in mintty:
> > >> output is skipped (like without the patch)
> > >> ↯input stalls, kill -9 fails.
> > >> Without conpty patch v6, both output and input are skipped.
> > >> Note that winpty properly handles this case.
> > > This problem is hard to be fixed in the current implementation...
> > Do you have an idea why it could make a difference whether the program 
> > is compiled with gcc or x86...mingw-gcc,
> > even if only w32 API functions are called?
> 
> This is also the same problem.
> 
> The reason was already noted in:
> https://cygwin.com/ml/cygwin-developers/2019-04/msg00042.html
> 
> Now I am under consideration on this problem.
> 
> -- 
> Takashi Yano <takashi.yano@nifty.ne.jp>


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  reply	other threads:[~2019-08-21 15:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-15 16:09 [PATCH v7 0/1] Pseudo console support in PTY (v7) Takashi Yano
2019-08-15 16:09 ` [PATCH v7 1/1] Cygwin: pty: add pseudo console support Takashi Yano
2019-08-17  8:36   ` Corinna Vinschen
2019-08-17 18:10     ` Mark Geisert
2019-08-19  6:36       ` Takashi Yano
2019-08-21 15:41         ` Takashi Yano [this message]
2019-08-23  3:19           ` Mark Geisert

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=20190822004135.ab3a5ccefbeb7c48b1a1b7ed@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin-developers@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).