X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/d186eb1a56cd733bf731074ea0627737540110b5..fdee2ba3df0efb75718d6f619d30a98a88d58134:/main.c diff --git a/main.c b/main.c index 0a57af63..5530e7c3 100644 --- a/main.c +++ b/main.c @@ -242,11 +242,15 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name) if ((pid=do_fork()) == 0) { + close(recv_pipe[0]); + close(f_out); recv_files(f_in,flist,local_name,recv_pipe[1]); if (am_daemon) report(-1); exit_cleanup(0); } + close(recv_pipe[1]); + close(f_in); generate_files(f_out,flist,local_name,recv_pipe[0]); waitpid(pid, &status, 0); @@ -501,6 +505,11 @@ int main(int argc,char *argv[]) return daemon_main(); } + if (argc < 1) { + usage(FERROR); + exit(1); + } + if (dry_run) verbose = MAX(verbose,1);