summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2012-06-21 08:23:28 +0000
committerMichael Paquier2012-06-21 08:23:28 +0000
commit82e55363b47cfce130d06c4233b757e406d918c0 (patch)
tree019044f8f7e1ba866d0d4f68418b39bb7fcf9eaa
parent4fab01e60ff70ba4edee688742a5b7ca539494a8 (diff)
Push -l option of gtm_ctl to gtm
This solves 2 problems: - Avoid to have an empty output file when gtm_ctl has a log file defined - Change log file name of GTM according to what is given by gtm_ctl Patch by Michael Meskes
-rw-r--r--src/gtm/gtm_ctl/gtm_ctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gtm/gtm_ctl/gtm_ctl.c b/src/gtm/gtm_ctl/gtm_ctl.c
index e3f345dbcc..d12132d7b9 100644
--- a/src/gtm/gtm_ctl/gtm_ctl.c
+++ b/src/gtm/gtm_ctl/gtm_ctl.c
@@ -286,9 +286,8 @@ start_gtm(void)
strncat(gtm_app_path, gtm_app, MAXPGPATH - len - 1);
if (log_file != NULL)
- len = snprintf(cmd, MAXPGPATH - 1, SYSTEMQUOTE "\"%s\" %s%s < \"%s\" >> \"%s\" 2>&1 &" SYSTEMQUOTE,
- gtm_app_path, gtmdata_opt, gtm_opts,
- DEVNULL, log_file);
+ len = snprintf(cmd, MAXPGPATH - 1, SYSTEMQUOTE "\"%s\" %s%s -l %s < \"%s\" 2>&1 &" SYSTEMQUOTE,
+ gtm_app_path, gtmdata_opt, gtm_opts, log_file, DEVNULL);
else
len = snprintf(cmd, MAXPGPATH - 1, SYSTEMQUOTE "\"%s\" %s%s < \"%s\" 2>&1 &" SYSTEMQUOTE,
gtm_app_path, gtmdata_opt, gtm_opts, DEVNULL);