Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
3efde6d
..
038a2d2
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-306,12
+306,19
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
{
int pid;
int status=0;
{
int pid;
int status=0;
+ int recv_pipe[2];
if (preserve_hard_links)
init_hard_links(flist);
if (preserve_hard_links)
init_hard_links(flist);
+ if (pipe(recv_pipe) < 0) {
+ fprintf(FERROR,"pipe failed in do_recv\n");
+ exit(1);
+ }
+
+
if ((pid=fork()) == 0) {
if ((pid=fork()) == 0) {
- recv_files(f_in,flist,local_name);
+ recv_files(f_in,flist,local_name
,recv_pipe[1]
);
if (preserve_hard_links)
do_hard_links(flist);
if (verbose > 2)
if (preserve_hard_links)
do_hard_links(flist);
if (verbose > 2)
@@
-319,7
+326,7
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
exit_cleanup(0);
}
exit_cleanup(0);
}
- generate_files(f_out,flist,local_name);
+ generate_files(f_out,flist,local_name
,recv_pipe[0]
);
waitpid(pid, &status, 0);
waitpid(pid, &status, 0);