Changed the static file_struct var to match the changes in rsync.h.
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index 0733a9a..9a1bec0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -103,7 +103,11 @@ static void show_malloc_stats(void);
  * remember_children(), we succeed instead of returning an error. */
 pid_t wait_process(pid_t pid, int *status_ptr, int flags)
 {
-       pid_t waited_pid = waitpid(pid, status_ptr, flags);
+       pid_t waited_pid;
+       
+       do {
+               waited_pid = waitpid(pid, status_ptr, flags);
+       } while (waited_pid == -1 && errno == EINTR);
 
        if (waited_pid == -1 && errno == ECHILD) {
                /* Status of requested child no longer available:  check to
@@ -626,7 +630,6 @@ static void read_final_goodbye(int f_in, int f_out)
        }
 }
 
-
 static void do_server_sender(int f_in, int f_out, int argc, char *argv[])
 {
        struct file_list *flist;
@@ -667,9 +670,8 @@ static void do_server_sender(int f_in, int f_out, int argc, char *argv[])
        }
 
        flist = send_file_list(f_out,argc,argv);
-       if (!flist || flist->count == 0) {
+       if (!flist || flist->count == 0)
                exit_cleanup(0);
-       }
        the_file_list = flist;
 
        io_start_buffering_in();
@@ -697,7 +699,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
 
 #ifdef SUPPORT_HARD_LINKS
        if (preserve_hard_links)
-               init_hard_links();
+               match_hard_links();
 #endif
 
        if (fd_pair(error_pipe) < 0) {
@@ -780,7 +782,6 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
        return exit_code;
 }
 
-
 static void do_server_recv(int f_in, int f_out, int argc,char *argv[])
 {
        int exit_code;
@@ -901,12 +902,10 @@ void start_server(int f_in, int f_out, int argc, char *argv[])
                keep_dirlinks = 0; /* Must be disabled on the sender. */
                if (need_messages_from_generator)
                        io_start_multiplex_in();
-
                recv_filter_list(f_in);
                do_server_sender(f_in, f_out, argc, argv);
-       } else {
+       } else
                do_server_recv(f_in, f_out, argc, argv);
-       }
        exit_cleanup(0);
 }
 
@@ -1019,7 +1018,7 @@ int client_run(int f_in, int f_out, pid_t pid, int argc, char *argv[])
        return MAX(exit_code, exit_code2);
 }
 
-static int copy_argv (char *argv[])
+static int copy_argv(char *argv[])
 {
        int i;