mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-03-13 11:56:14 -04:00
if f_in == f_out then don't close one of them
This commit is contained in:
4
main.c
4
main.c
@@ -243,14 +243,14 @@ 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);
|
||||
if (f_in != f_out) 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);
|
||||
if (f_in != f_out) close(f_in);
|
||||
generate_files(f_out,flist,local_name,recv_pipe[0]);
|
||||
|
||||
waitpid(pid, &status, 0);
|
||||
|
||||
Reference in New Issue
Block a user