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:
8d9dc9f
)
handle rsh clients that don't like half-open connections
author
Andrew Tridgell
<tridge@samba.org>
Mon, 18 May 1998 09:34:33 +0000
(09:34 +0000)
committer
Andrew Tridgell
<tridge@samba.org>
Mon, 18 May 1998 09:34:33 +0000
(09:34 +0000)
main.c
patch
|
blob
|
blame
|
history
diff --git
a/main.c
b/main.c
index
5a5d515
..
bcc292b
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-248,29
+248,27
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
io_flush();
if ((pid=do_fork()) == 0) {
io_flush();
if ((pid=do_fork()) == 0) {
- close(recv_pipe[1]);
- io_close_input(f_in);
- if (f_in != f_out) close(f_in);
- generate_files(f_out,flist,local_name,recv_pipe[0]);
+ close(recv_pipe[0]);
+ if (f_in != f_out) close(f_out);
+
+ recv_files(f_in,flist,local_name,recv_pipe[1]);
+ if (!am_server)
+ report(f_in);
+
+ if (verbose > 3)
+ rprintf(FINFO,"do_recv waiting on %d\n",pid);
io_flush();
_exit(0);
}
io_flush();
_exit(0);
}
-
- close(recv_pipe[0]);
- if (f_in != f_out) close(f_out);
-
- recv_files(f_in,flist,local_name,recv_pipe[1]);
- if (!am_server)
- report(f_in);
-
- if (verbose > 3)
- rprintf(FINFO,"do_recv waiting on %d\n",pid);
+ close(recv_pipe[1]);
+ io_close_input(f_in);
+ if (f_in != f_out) close(f_in);
+ generate_files(f_out,flist,local_name,recv_pipe[0]);
io_flush();
waitpid(pid, &status, 0);
io_flush();
waitpid(pid, &status, 0);
-
return status;
}
return status;
}