From d211b3d795b09179428b04a409113858ccb24648 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Fri, 2 Mar 2018 19:35:44 +0100 Subject: [PATCH] config: properly warn on duplicate pid-file option Signed-off-by: Nikos Mavrogiannopoulos --- src/config.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 694c064c..5a2b586f 100644 --- a/src/config.c +++ b/src/config.c @@ -581,8 +581,11 @@ static int cfg_ini_handler(void *_ctx, const char *section, const char *name, co /* cannot be modified as it would require sec-mod to * re-read configuration too */ READ_NUMERIC(perm_config->stats_reset_time); - } else if (strcmp(name, "pid-file") == 0 && pid_file[0] == 0) { - READ_STATIC_STRING(pid_file); + } else if (strcmp(name, "pid-file") == 0) { + if (pid_file[0] == 0) { + READ_STATIC_STRING(pid_file); + } else if (reload == 0) + fprintf(stderr, NOTESTR"skipping 'pid-file' config option\n"); } else { stage1_found = 0; }