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

Ken Brown kbrown@cornell.edu
Fri Sep 3 15:14:42 GMT 2021


On 9/3/2021 11:00 AM, Corinna Vinschen wrote:
> On Sep  3 08:13, Ken Brown wrote:
>> One tiny thing I noticed: get_obj_handle_count can return 0.  So the line
>>
>>    reader_count = get_obj_handle_count (get_handle ());
>>
>> should be
>>
>>    reader_count = get_obj_handle_count (get_handle ()) ?: 1;
>>
>> Or else get_obj_handle_count should be changed to return 1 instead of 0 if
>> NtQueryObject fails.
> 
> We're in the reader with a valid read handle asking for the number of
> open handles.  NtQueryObject can only fail if the handle is invalid.
> I don't see how this could be the case here.

I don't either.  I was just being paranoid and wanted to avoid the 
appearance that we might divide by 0.  But if you're sure it's 
impossible, that's fine.

Ken


More information about the Cygwin-developers mailing list