X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/fc8a6b97051ae24622472b5117f48bdfb2413f57..fe055c718ab5f3813d4e8b070b8b72dd9c2e0076:/main.c diff --git a/main.c b/main.c index 217ddf41..ed9dd173 100644 --- a/main.c +++ b/main.c @@ -172,6 +172,10 @@ static char *get_local_name(struct file_list *flist,char *name) STRUCT_STAT st; extern int orig_umask; + if (verbose > 2) + rprintf(FINFO,"get_local_name count=%d %s\n", + flist->count, name); + if (do_stat(name,&st) == 0) { if (S_ISDIR(st.st_mode)) { if (!push_dir(name, 0)) { @@ -250,6 +254,10 @@ static void do_server_sender(int f_in, int f_out, int argc,char *argv[]) exit_cleanup(0); } + set_nonblocking(f_out); + if (f_in != f_out) + set_nonblocking(f_in); + send_files(flist,f_out,f_in); report(f_out); io_flush(); @@ -278,6 +286,8 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) close(recv_pipe[0]); if (f_in != f_out) close(f_out); + set_nonblocking(f_in); + recv_files(f_in,flist,local_name,recv_pipe[1]); report(f_in); @@ -291,6 +301,9 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) close(recv_pipe[1]); io_close_input(f_in); if (f_in != f_out) close(f_in); + + set_nonblocking(f_out); + generate_files(f_out,flist,local_name,recv_pipe[0]); io_flush(); @@ -381,6 +394,11 @@ int client_run(int f_in, int f_out, int pid, int argc, char *argv[]) flist = send_file_list(f_out,argc,argv); if (verbose > 3) rprintf(FINFO,"file list sent\n"); + + set_nonblocking(f_out); + if (f_in != f_out) + set_nonblocking(f_in); + send_files(flist,f_out,f_in); if (pid != -1) { if (verbose > 3)