From c38dcff53c605caea55eead5a5d0e72f2c399665 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Sun, 19 Aug 2018 21:56:53 +0300 Subject: [PATCH] MXS-2019: Remove header and footer output Now that the exit handlers work correctly, the output of `maxscale --version` no longer consists of a single line but multiple lines in both stdout and stderr. Removing the printing to stderr guarantees that the correct output is produced. --- server/core/gateway.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/core/gateway.cc b/server/core/gateway.cc index e229f9612..1d12f879f 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -1436,7 +1436,7 @@ int main(int argc, char **argv) sigset_t sigpipe_mask; sigset_t saved_mask; bool to_stdout = false; - void (*exitfunp[4])(void) = { mxs_log_finish, cleanup_process_datadir, write_footer, NULL }; + void (*exitfunp[4])(void) = { mxs_log_finish, cleanup_process_datadir, NULL }; int numlocks = 0; bool pid_file_created = false; Worker* worker; @@ -1454,7 +1454,6 @@ int main(int argc, char **argv) progname = *argv; snprintf(datadir, PATH_MAX, "%s", default_datadir); datadir[PATH_MAX] = '\0'; - file_write_header(stderr); // Option string for getopt const char accepted_opts[] = "dnce:f:g:l:vVs:S:?L:D:C:B:U:A:P:G:N:E:F:M:H:p";