Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7544c45
)
if f_in == f_out then don't close one of them
author
Andrew Tridgell
<tridge@samba.org>
Sun, 17 May 1998 15:18:25 +0000
(15:18 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Sun, 17 May 1998 15:18:25 +0000
(15:18 +0000)
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
5530e7c
..
dbe6aab
100644
(file)
--- a/
main.c
+++ b/
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);