X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/9a52223bce23c54dabff27c8e02d4814c7a498dd..feaa89c410544775afc19eac4a966e8345d5134a:/io.c diff --git a/io.c b/io.c index 563dacfc..54ceb281 100644 --- a/io.c +++ b/io.c @@ -211,27 +211,6 @@ int write_sparse(int f,char *buf,int len) return len; } -int read_write(int fd_in,int fd_out,int size) -{ - static char *buf=NULL; - int bufsize = sparse_files?SPARSE_WRITE_SIZE:WRITE_SIZE; - int total=0; - - if (!buf) { - buf = (char *)malloc(bufsize); - if (!buf) out_of_memory("read_write"); - } - - while (total < size) { - int n = MIN(size-total,bufsize); - read_buf(fd_in,buf,n); - if (write_sparse(fd_out,buf,n) != n) - return total; - total += n; - } - return total; -} - static int writefd(int fd,char *buf,int len) { @@ -252,8 +231,14 @@ static int writefd(int fd,char *buf,int len) return -1; if (ret == -1 && got_select) { + /* hmmm, we got a write select on the fd and then failed to write. + Why doesn't that mean that the fd is dead? It doesn't on some + systems it seems (eg. IRIX) */ + u_sleep(1000); +#if 0 fprintf(FERROR,"write exception\n"); exit_cleanup(1); +#endif } got_select = 0;