cygrunsrv + sshd + rsync = 20 times too slow -- throttled?

Corinna Vinschen
Mon Sep 13 09:07:42 GMT 2021

On Sep 11 11:35, Takashi Yano wrote:
> On Fri, 10 Sep 2021 22:17:21 -0400
> Ken Brown wrote:
> > My suggestion is that we impose a timeout in this situation, after which select 
> > reports write ready.
> Keeping read handle in write pipe (Corinna's query_hdl) causes problem
> that write side cannot detect close on read side.
> Is it possible to open read handle temporally when pipe_data_available()
> is called?

1. You would have to know which process keeps the other side of the pipe.
2. You would have to have the permission to open the other process to
   duplicate the pipe into your own process
3. You would have to know the HANDLE value of the read side of your pipe
   in that other process.

Point 1 is (kind of) doable using GetNamedPipeClientProcessId or
GetNamedPipeServerProcessId.  ZIt's not clear how reliable these
functions are, given that both pipe sides are created by the same
process and then usually inherited by two child processes communicating
over that pipe.

Point 2 is most of the time the case, especially when talking with
native processes.

Point 3 requires some sort of IPC.

Having said that, I think this is too complicated.


More information about the Cygwin-developers mailing list