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
added insure debug support
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
f7e52be
..
6a4d103
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-112,6
+112,7
@@
static int do_cmd(char *cmd,char *machine,char *user,char *path,int *f_in,int *f
char *tok,*dir=NULL;
extern int local_server;
extern char *rsync_path;
char *tok,*dir=NULL;
extern int local_server;
extern char *rsync_path;
+ extern int blocking_io;
if (!local_server) {
if (!cmd)
if (!local_server) {
if (!cmd)
@@
-144,6
+145,9
@@
static int do_cmd(char *cmd,char *machine,char *user,char *path,int *f_in,int *f
args[argc++] = rsync_path;
server_options(args,&argc);
args[argc++] = rsync_path;
server_options(args,&argc);
+
+
+ if (strcmp(cmd, RSYNC_RSH) == 0) blocking_io = 1;
}
args[argc++] = ".";
}
args[argc++] = ".";
@@
-324,9
+328,10
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
write_int(recv_pipe[1],1);
close(recv_pipe[1]);
io_flush();
write_int(recv_pipe[1],1);
close(recv_pipe[1]);
io_flush();
- /* finally we go to sleep until our parent kills us with
- a USR2 signal */
- while (1) sleep(60);
+ /* finally we go to sleep until our parent kills us
+ with a USR2 signal. We sleepp for a short time as on
+ some OSes a signal won't interrupt a sleep! */
+ while (1) sleep(1);
}
close(recv_pipe[1]);
}
close(recv_pipe[1]);