[BACK]Return to main.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / rsync

Diff for /src/usr.bin/rsync/main.c between version 1.46 and 1.47

version 1.46, 2019/05/28 18:20:30 version 1.47, 2019/06/03 15:37:48
Line 428 
Line 428 
   
         if (fargs->remote && opts.ssh_prog == NULL) {          if (fargs->remote && opts.ssh_prog == NULL) {
                 assert(fargs->mode == FARGS_RECEIVER);                  assert(fargs->mode == FARGS_RECEIVER);
                 if ((rc = rsync_connect(&opts, &sd, fargs)) == 0)                  if ((rc = rsync_connect(&opts, &sd, fargs)) == 0) {
                         rc = rsync_socket(&opts, sd, fargs);                          rc = rsync_socket(&opts, sd, fargs);
                           close(sd);
                   }
                 exit(rc);                  exit(rc);
         }          }
   
Line 484 
Line 486 
                 break;                  break;
         }          }
   
         /*          close(fds[0]);
          * If the client has an error and exits, the server may be  
          * sitting around waiting to get data while we waitpid().  
          * So close the connection here so that they don't hang.  
          */  
   
         if (rc)  
                 close(fds[0]);  
   
         if (waitpid(child, &st, 0) == -1)          if (waitpid(child, &st, 0) == -1)
                 err(1, "waitpid");                  err(1, "waitpid");

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47