[Rsync-patches] [PATCH] Give a meaningful error message when we fail to write to a batch file.
Wayne Davison <wayned at samba.org>
Mon Mar 9 08:01:54 PDT 2009
On Sat, Jan 31, 2009 at 01:14:17AM -0500, Matt McCutchen wrote:
> - if (fd == write_batch_monitor_out) {
> - if ((size_t)write(batch_fd, buf, len) != len)
> - exit_cleanup(RERR_FILEIO);
> - }
> + if (fd == write_batch_monitor_out)
> + writefd_unbuffered(batch_fd, buf, len);
This part concerned me, making me wonder if it would cause problems or
not; e.g. if it might try to read more data when writing the batch file.
However, I forgot to look into the issue. Have you checked if msg_fd_in
is always < 0 when using that to write the batch file? It should always
be -1 in the receiver (since it's primary use is in the generator), but
the sender uses it during the file-list transfer phase too.
..wayne..
More information about the rsync-patches
mailing list