Fix for rsync server processes hanging around after the client
authorMartin Pool <mbp@samba.org>
Mon, 18 Feb 2002 19:54:00 +0000 (19:54 +0000)
committerMartin Pool <mbp@samba.org>
Mon, 18 Feb 2002 19:54:00 +0000 (19:54 +0000)
unexpectedly disconnects.  (Colin Walters) (Debian bug #128632)

NEWS
io.c

diff --git a/NEWS b/NEWS
index 7e2fa06..ee00289 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,9 @@ rsync 2.5.3 (not released yet)
     * Fixed problem on systems such as Sunos4 that do not support realloc
       on a NULL pointer; error was "out of memory in flist_expand".
 
+    * Fix for rsync server processes hanging around after the client
+      unexpectedly disconnects.  (Colin Walters) (Debian bug #128632)
+
   ENHANCEMENTS:
 
     * Command to initiate connections is only shown with -vv, rather
diff --git a/io.c b/io.c
index 3c0b790..eeb3a56 100644 (file)
--- a/io.c
+++ b/io.c
@@ -454,6 +454,9 @@ static void writefd_unbuffered(int fd,char *buf,size_t len)
                        }
 
                        if (ret <= 0) {
+                               /* Don't try to write errors back
+                                * across the stream */
+                               io_multiplexing_close();
                                rprintf(FERROR,
                                        "error writing %d unbuffered bytes"
                                        " - exiting: %s\n", len,