version 1.46, 2019/05/28 18:20:30 |
version 1.47, 2019/06/03 15:37:48 |
|
|
|
|
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); |
} |
} |
|
|
|
|
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"); |