[PATCH v2] Cygwin: pty: Revise code waiting for forwarding again.

Takashi Yano takashi.yano@nifty.ne.jp
Thu Jan 23 14:16:00 GMT 2020


On Thu, 23 Jan 2020 13:51:54 +0100
Corinna Vinschen wrote:
> On Jan 23 13:30, Takashi Yano wrote:
> > - After commit 6cc299f0e20e4b76f7dbab5ea8c296ffa4859b62, outputs of
> >   cygwin programs which call both printf() and WriteConsole() are
> >   frequently distorted. This patch reverts waiting function to dumb
> >   Sleep().
> 
> I understand the need for this change, but isn't there any other
> way to detect if the pseudo console being ready?  E. g., something
> in the HPCON_INTERNAL struct or so?

As for HPCON_INTERNAL,

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

hWritePipe:
This is for sending window size change message to pseudo console
(conhost.exe process).

hConDrvRererence:
I am not sure what this is for.

hConHostProcess:
Process handle of conhost.exe process.

None of them seems able to be used for that purpose.
I do not come up with other implementation so far.

Let me consider a while.

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



More information about the Cygwin-patches mailing list