Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cause all three processes to report memory stats when -vv --stats
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
b40922a
..
c0db3fc
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-116,6
+116,9
@@
static void report(int f)
show_flist_stats();
}
show_flist_stats();
}
+ if (am_generator)
+ return;
+
if (am_daemon) {
log_exit(0, __FILE__, __LINE__);
if (f == -1 || !am_sender) return;
if (am_daemon) {
log_exit(0, __FILE__, __LINE__);
if (f == -1 || !am_sender) return;
@@
-467,6
+470,7
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
generate_files(f_out, flist, local_name);
get_redo_num(); /* Read final MSG_DONE and any prior messages. */
generate_files(f_out, flist, local_name);
get_redo_num(); /* Read final MSG_DONE and any prior messages. */
+ report(-1);
io_flush(FULL_FLUSH);
if (protocol_version >= 24) {
/* send a final goodbye message */
io_flush(FULL_FLUSH);
if (protocol_version >= 24) {
/* send a final goodbye message */
@@
-979,7
+983,7
@@
int main(int argc,char *argv[])
#endif /* def MAINTAINER_MODE */
starttime = time(NULL);
#endif /* def MAINTAINER_MODE */
starttime = time(NULL);
- am_root = (
getuid
() == 0);
+ am_root = (
MY_UID
() == 0);
memset(&stats, 0, sizeof(stats));
memset(&stats, 0, sizeof(stats));
@@
-1013,6
+1017,8
@@
int main(int argc,char *argv[])
* that implement getcwd that way "pwd" can't be found after chroot. */
push_dir(NULL);
* that implement getcwd that way "pwd" can't be found after chroot. */
push_dir(NULL);
+ init_flist();
+
if (write_batch && !am_server) {
write_batch_argvs_file(orig_argc, orig_argv);
}
if (write_batch && !am_server) {
write_batch_argvs_file(orig_argc, orig_argv);
}
@@
-1028,13
+1034,6
@@
int main(int argc,char *argv[])
if (dry_run)
verbose = MAX(verbose,1);
if (dry_run)
verbose = MAX(verbose,1);
-#ifndef SUPPORT_LINKS
- if (!am_server && preserve_links) {
- rprintf(FERROR,"ERROR: symbolic links not supported\n");
- exit_cleanup(RERR_UNSUPPORTED);
- }
-#endif
-
if (am_server) {
set_nonblocking(STDIN_FILENO);
set_nonblocking(STDOUT_FILENO);
if (am_server) {
set_nonblocking(STDIN_FILENO);
set_nonblocking(STDOUT_FILENO);