Status Query - Please respond - Re: Patch to avoid 'Connection reset by peer' error for rsync on cygwin

Max Bowsher maxb at
Thu May 16 03:07:02 EST 2002

No. That just moves the shutdown call from whren you finish with the fd to where
you start using the fd - that's got to be less intuitive.
Surely it isn't too much to close file descriptors you open? Just because Linux
lets you get away without it doesn't mean its a good idea.

Anyway, if I provide a patch that neatly closes socket fds when they are no
longer needed, will it get applied?


Wayne Davison <wayned at> wrote:
> Here's an idea which I haven't had a chance to investigate:
> Would it be possible to use atexit() to register a call to shutdown()
> for cygwin (or a call to a custom function that would call shutdown()
> for the appropriate socket fds)?  This should allow cgywin's broken
> socket code to get properly cleaned up without having to sprinkle a
> bunch of cygwin-specific code all over the source (as long as the
> socket fds don't get closed before we start the exit handling).
> ..wayne..

More information about the rsync mailing list