diff options
author | Wayne Davison <wayned@samba.org> | 2004-01-27 23:13:14 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2004-01-27 23:13:14 +0000 |
commit | b695f2423da67ecb2cd203c4af1cd163775da927 (patch) | |
tree | 5ec7510b06f468fd0c9ae65a3e97b46f7458f8a8 /main.c | |
parent | c3e5e5851be229b46440ca5660dff0ae2b526455 (diff) | |
download | rsync-b695f2423da67ecb2cd203c4af1cd163775da927.tar.gz |
Set the am_generator flag. Use who_am_i().
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -27,6 +27,7 @@ extern struct stats stats; extern int am_root; extern int am_server; extern int am_sender; +extern int am_generator; extern int am_daemon; extern int verbose; extern int blocking_io; @@ -57,6 +58,7 @@ extern char *rsync_path; extern char *shell_cmd; extern struct file_list *batch_flist; + /* there's probably never more than at most 2 outstanding child processes, * but set it higher just in case. */ @@ -198,7 +200,7 @@ static void show_malloc_stats(void) getpid(), am_server ? "server " : "", am_daemon ? "daemon " : "", - am_sender ? "sender" : "receiver"); + who_am_i()); rprintf(FINFO, " arena: %10d (bytes from sbrk)\n", mi.arena); rprintf(FINFO, " ordblks: %10d (chunks not in use)\n", mi.ordblks); rprintf(FINFO, " smblks: %10d\n", mi.smblks); @@ -305,8 +307,6 @@ oom: } - - static char *get_local_name(struct file_list *flist,char *name) { STRUCT_STAT st; @@ -455,6 +455,8 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) msleep(20); } + am_generator = 1; + close(error_pipe[1]); if (f_in != f_out) close(f_in); |