extern int keep_partial;
extern int log_got_error;
extern char *partial_dir;
-@@ -103,6 +106,11 @@ NORETURN void _exit_cleanup(int code, co
-
- in_exit_cleanup = 1;
+@@ -122,6 +125,11 @@ NORETURN void _exit_cleanup(int code, co
+ case 1:
+ cleanup_step++;
+#if HAVE_OPENSSL
-+ if (use_ssl)
-+ end_tls();
++ if (use_ssl)
++ end_tls();
+#endif
+
- if (verbose > 3) {
- rprintf(FINFO,"_exit_cleanup(code=%d, file=%s, line=%d): entered\n",
- code, file, line);
+ if (cleanup_child_pid != -1) {
+ int status;
+ int pid = wait_process(cleanup_child_pid, &status, WNOHANG);
--- old/clientserver.c
+++ new/clientserver.c
@@ -29,6 +29,9 @@ extern int am_sender;
{"verbose", 'v', POPT_ARG_NONE, 0, 'v', 0, 0 },
{"no-verbose", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
{"no-v", 0, POPT_ARG_VAL, &verbose, 0, 0, 0 },
-@@ -848,6 +889,12 @@ int parse_arguments(int *argc, const cha
+@@ -851,6 +892,12 @@ int parse_arguments(int *argc, const cha
verbose++;
break;
default:
rprintf(FERROR,
"rsync: %s: %s (in daemon mode)\n",
-@@ -871,6 +918,17 @@ int parse_arguments(int *argc, const cha
+@@ -874,6 +921,17 @@ int parse_arguments(int *argc, const cha
exit_cleanup(RERR_SYNTAX);
}
*argv = poptGetArgs(pc);
*argc = count_args(*argv);
am_starting_up = 0;
-@@ -1082,6 +1140,12 @@ int parse_arguments(int *argc, const cha
+@@ -1085,6 +1143,12 @@ int parse_arguments(int *argc, const cha
usage(FINFO);
exit_cleanup(0);
default:
/* A large opt value means that set_refuse_options()
* turned this option off. */
-@@ -1358,6 +1422,17 @@ int parse_arguments(int *argc, const cha
+@@ -1361,6 +1425,17 @@ int parse_arguments(int *argc, const cha
if (delay_updates && !partial_dir)
partial_dir = tmp_partialdir;
if (inplace) {
#ifdef HAVE_FTRUNCATE
if (partial_dir) {
-@@ -1775,10 +1850,27 @@ char *check_for_hostspec(char *s, char *
+@@ -1778,10 +1853,27 @@ char *check_for_hostspec(char *s, char *
char *p;
int not_host;
int hostlen;