On Wednesday 2002-05-22 19:00, Charles C. Fu ?????? wrote:
| [This is a copy of the contents of Debian bug report #147842.]

This looks like the same race condition that I reported to the rsync
mailing list on 2002-05-16. The following patch fixes my problem:

--- rsync-2.5.5/log.c.orig      Mon Feb 18 20:51:12 2002
+++ rsync-2.5.5/log.c   Wed May 15 16:12:18 2002
@@ -116,7 +116,12 @@
                int n = write(log_error_fd, el->buf+el->written, el->len - 
el->written);
                /* don't check for an error if the best way of handling the error is
                   to ignore it */
-               if (n == -1) break;
+               if (n == -1) {
+                       if (errno == EAGAIN) {
+                               msleep(20);
+                       }
+                       break;
+               }
                if (n > 0) {
                        el->written += n;
                }

-- 
Dick Streefland                      ////             Altium Software BV
[EMAIL PROTECTED]           (@ @)          http://www.altium.com
--------------------------------oOO--(_)--OOo---------------------------

-- 
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to