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
handle systems that don't take a 2nd argument to gettimeofday()
[rsync/rsync.git]
/
main.c
diff --git
a/main.c
b/main.c
index
35f6400
..
404d49b
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-23,8
+23,6
@@
time_t starttime = 0;
struct stats stats;
struct stats stats;
-extern int csum_length;
-
extern int verbose;
static void report(int f)
extern int verbose;
static void report(int f)
@@
-208,7
+206,7
@@
static char *get_local_name(struct file_list *flist,char *name)
return name;
}
return name;
}
- if (flist->count
=
= 1)
+ if (flist->count
<
= 1)
return name;
if (do_mkdir(name,0777 & ~orig_umask) != 0) {
return name;
if (do_mkdir(name,0777 & ~orig_umask) != 0) {
@@
-263,10
+261,6
@@
static void do_server_sender(int f_in, int f_out, int argc,char *argv[])
argv[0] = ".";
}
argv[0] = ".";
}
- set_nonblocking(f_out);
- if (f_in != f_out)
- set_nonblocking(f_in);
-
flist = send_file_list(f_out,argc,argv);
if (!flist || flist->count == 0) {
exit_cleanup(0);
flist = send_file_list(f_out,argc,argv);
if (!flist || flist->count == 0) {
exit_cleanup(0);
@@
-300,9
+294,6
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
close(recv_pipe[0]);
if (f_in != f_out) close(f_out);
close(recv_pipe[0]);
if (f_in != f_out) close(f_out);
- set_nonblocking(f_in);
- set_nonblocking(recv_pipe[1]);
-
recv_files(f_in,flist,local_name,recv_pipe[1]);
report(f_in);
recv_files(f_in,flist,local_name,recv_pipe[1]);
report(f_in);
@@
-314,15
+305,12
@@
static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
io_close_input(f_in);
if (f_in != f_out) close(f_in);
io_close_input(f_in);
if (f_in != f_out) close(f_in);
- set_nonblocking(f_out);
- set_nonblocking(recv_pipe[0]);
-
io_start_buffering(f_out);
generate_files(f_out,flist,local_name,recv_pipe[0]);
io_flush();
io_start_buffering(f_out);
generate_files(f_out,flist,local_name,recv_pipe[0]);
io_flush();
- wait
pid(pid, &status, 0
);
+ wait
_process(pid, &status
);
return status;
}
return status;
}
@@
-378,10
+366,6
@@
void start_server(int f_in, int f_out, int argc, char *argv[])
extern int cvs_exclude;
extern int am_sender;
extern int cvs_exclude;
extern int am_sender;
- set_nonblocking(f_out);
- if (f_in != f_out)
- set_nonblocking(f_in);
-
setup_protocol(f_out, f_in);
if (am_sender) {
setup_protocol(f_out, f_in);
if (am_sender) {
@@
-417,16
+401,12
@@
int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
if (verbose > 3)
rprintf(FINFO,"file list sent\n");
if (verbose > 3)
rprintf(FINFO,"file list sent\n");
- set_nonblocking(f_out);
- if (f_in != f_out)
- set_nonblocking(f_in);
-
send_files(flist,f_out,f_in);
if (pid != -1) {
if (verbose > 3)
rprintf(FINFO,"client_run waiting on %d\n",pid);
io_flush();
send_files(flist,f_out,f_in);
if (pid != -1) {
if (verbose > 3)
rprintf(FINFO,"client_run waiting on %d\n",pid);
io_flush();
- wait
pid(pid, &status, 0
);
+ wait
_process(pid, &status
);
}
report(-1);
exit_cleanup(status);
}
report(-1);
exit_cleanup(status);
@@
-450,7
+430,7
@@
int client_run(int f_in, int f_out, int pid, int argc, char *argv[])
if (verbose > 3)
rprintf(FINFO,"client_run2 waiting on %d\n",pid);
io_flush();
if (verbose > 3)
rprintf(FINFO,"client_run2 waiting on %d\n",pid);
io_flush();
- wait
pid(pid, &status, 0
);
+ wait
_process(pid, &status
);
}
return status | status2;
}
return status | status2;