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

Ken Brown
Wed Sep 8 17:43:29 GMT 2021

On 9/8/2021 7:55 AM, Corinna Vinschen wrote:
> On Sep  8 20:32, Takashi Yano wrote:
>> As for this patch, read_mtx was introduced. This handle is initialized
>> only for read pipe. However, this seems to be NULL even without
>> initialization in write pipe. I wonder why initializing read_mtx in
>> the constructor is not necessary.
>> How do you guarantee that read_mtx is NULL on the write pipe?
> fhandlers are always calloc'ed on the cygheap, so you don't have
> to initialize anything to NULL.  It doesn't hurt, of course, but
> it's certainly not required.

Takashi and I both asked this question, and you had to answer it twice.  It's 
likely that future readers of the code will ask it again.  Would you be amenable 
to a code cleanup patch that answers it once and for all?  I would suggest (a) 
removing all 0/NULL initializers from fhandler constructors and (b) adding 
comments explaining why they're not needed.


More information about the Cygwin-developers mailing list