From 2c800c734e535a0f2ba17d7645c41505642e9351 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 2 Feb 2009 19:23:20 +0100 Subject: [PATCH] Invalidate all rsync options on SIGHUP. gengetopt's params->override option does not do what its name suggests, see http://www.opensubscriber.com/message/help-gengetopt@gnu.org/10980633.html or http://www.mail-archive.com/help-gengetopt@gnu.org/msg00507.html --- dss.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dss.c b/dss.c index c4349a8..ecf2b3f 100644 --- a/dss.c +++ b/dss.c @@ -620,6 +620,15 @@ static int parse_config_file(int override) .check_ambiguity = 0, .print_errors = 1 }; + if (override) { /* invalidate all rsync options */ + int i; + + for (i = 0; i < conf.rsync_option_given; i++) { + free(conf.rsync_option_arg[i]); + conf.rsync_option_arg[i] = NULL; + } + conf.rsync_option_given = 0; + } cmdline_parser_config_file(config_file, &conf, ¶ms); } ret = check_config(); -- 2.39.5