mi = mallinfo();
- rprintf(FINFO, RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n",
+ rprintf(FINFO, "\n" RSYNC_NAME "[%d] (%s%s%s) heap statistics:\n",
getpid(),
am_server ? "server " : "",
am_daemon ? "daemon " : "",
args[argc++] = rsync_path;
if (blocking_io < 0) {
- char *cp = getenv(RSYNC_RSH_IO_ENV);
- if (rsh_env && cp && strcmp(cmd, rsh_env) == 0)
- blocking_io = *cp == 'b' || *cp == 'B';
- else {
- if ((cp = strrchr(cmd, '/')) != NULL)
- cp++;
- else
- cp = cmd;
- if (strcmp(cp, "rsh") == 0 || strcmp(cp, "remsh") == 0)
- blocking_io = 1;
- }
+ char *cp;
+ if ((cp = strrchr(cmd, '/')) != NULL)
+ cp++;
+ else
+ cp = cmd;
+ if (strcmp(cp, "rsh") == 0 || strcmp(cp, "remsh") == 0)
+ blocking_io = 1;
}
server_options(args,&argc);
exit_cleanup(0);
}
+ io_start_buffering_in(f_in);
+ io_start_buffering_out(f_out);
send_files(flist,f_out,f_in);
io_flush();
report(f_out);
if (protocol_version >= 24) {
/* final goodbye message */
- read_int(f_in);
- }
+ read_int(f_in);
+ }
io_flush();
exit_cleanup(0);
}
close(error_pipe[1]);
if (f_in != f_out) close(f_in);
- io_start_buffering(f_out);
+ io_start_buffering_out(f_out);
io_set_error_fd(error_pipe[0]);
}
}
+ io_start_buffering_in(f_in);
if (delete_mode && !delete_excluded)
recv_exclude_list(f_in);
extern int cvs_exclude;
extern int delete_mode;
extern int delete_excluded;
+ io_start_buffering_out(f_out);
if (cvs_exclude)
add_cvs_excludes();
if (delete_mode && !delete_excluded)
send_exclude_list(f_out);
if (remote_filesfrom_file)
filesfrom_fd = f_in;
- if (!read_batch) /* dw -- don't write to pipe */
+ if (!read_batch) /* don't write to pipe */
flist = send_file_list(f_out,argc,argv);
if (verbose > 3)
rprintf(FINFO,"file list sent\n");
+ io_flush();
+ io_start_buffering_out(f_out);
send_files(flist,f_out,f_in);
+ io_flush();
if (protocol_version >= 24) {
/* final goodbye message */
read_int(f_in);
wait_process(pid, &status);
}
report(-1);
+ io_flush();
exit_cleanup(status);
}