[PATCH] Cygwin: pty: Revise code waiting for forwarding by master_fwd_thread.

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Jan 20 10:39:00 GMT 2020


Hi Takashi,

On Jan 20 11:50, Takashi Yano wrote:
> - Though this rarely happens, sometimes the first printing of non-
>   cygwin process does not displayed correctly. To fix this issue,
>   the code for waiting for forwarding by master_fwd_thread is revised.
> ---
> [...]
> +void
> +fhandler_pty_slave::wait_forwarding (void)
> +{
> +  const DWORD time_to_wait = 40;
> +  DWORD elasped = GetTickCount () - get_ttyp ()->last_fwd_time;
> +  if (elasped < time_to_wait)
> +    Sleep (time_to_wait - elasped);
> +}
> +

Are these 40 ms an experimental value or is that based on knowledge
of implementation details?  The real question is, isn't there any
other, more reliable indicator to see if forwarding will work?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20200120/c363a1e8/attachment.sig>


More information about the Cygwin-patches mailing list