- keep a list of pids and send them a SIGUSR1 for cleanup rather than
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index 9b2d9db..23a465c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -356,7 +356,7 @@ static int do_recv(int f_in,int f_out,struct file_list *flist,char *local_name)
   }
   
 
-  if ((pid=fork()) == 0) {
+  if ((pid=do_fork()) == 0) {
     recv_files(f_in,flist,local_name,recv_pipe[1]);
     if (verbose > 2)
       fprintf(FERROR,"receiver read %d\n",read_total());
@@ -519,11 +519,6 @@ int main(int argc,char *argv[])
     struct file_list *flist;
     char *local_name = NULL;
 
-#ifdef SETPGRP_VOID
-    setpgrp();
-#else
-    setpgrp(0,0);
-#endif
     signal(SIGUSR1, sigusr1_handler);
 
     starttime = time(NULL);