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

Takashi Yano takashi.yano@nifty.ne.jp
Mon Sep 20 21:27:37 GMT 2021


Hi Ken,

Thanks for reviewing the code.

On Mon, 20 Sep 2021 17:09:48 -0400
Ken Brown wrote:
> On 9/20/2021 3:14 PM, Ken Brown wrote:
> > +      if (wcscmp (name, ntfn->Name.Buffer) == 0)
> > +	{
> > +	  query_hdl_proc = proc;
> > +	  query_hdl_value = (HANDLE)(intptr_t) shi->Handles[i].HandleValue;
> > +	  qh = h;
> > +	  break;
> > +	}
> > +close_handle:
> > +      CloseHandle (h);
> > +close_proc:
> > +      CloseHandle (proc);
> 
> Doesn't this mean that query_hdl_proc is not a valid handle any more?  So the 
> attempt to reduce overhead at the beginning of tentative_query_hdl() will never 
> work.

When the handle which name matches the pipe name is found, 'break'
is used in the 'for' loop, so the CloseHandle(proc) is not called.
Therefore, query_hdl_proc still has valid handle after 'break'.

> Other than that, I still think it looks great.  But it's complicated enough that 
> I think Corinna should review it too when she returns.  (It also uses Windows 
> functions that I have no experience with.)  Nevertheless, I'm tempted to push it 
> so that it can get testing, even if Corinna changes it or reverts it later.

Thanks much.

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


More information about the Cygwin-developers mailing list