From b5ec55dea8e463eab9cbbf235c63bca1ac028731 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 20 Sep 2017 10:51:48 +0300 Subject: [PATCH 1/2] Update version to 2.1.9 --- VERSION21.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION21.cmake b/VERSION21.cmake index 41a573525..361a61bcc 100644 --- a/VERSION21.cmake +++ b/VERSION21.cmake @@ -5,7 +5,7 @@ set(MAXSCALE_VERSION_MAJOR "2" CACHE STRING "Major version") set(MAXSCALE_VERSION_MINOR "1" CACHE STRING "Minor version") -set(MAXSCALE_VERSION_PATCH "8" CACHE STRING "Patch version") +set(MAXSCALE_VERSION_PATCH "9" CACHE STRING "Patch version") # This should only be incremented if a package is rebuilt set(MAXSCALE_BUILD_NUMBER 1 CACHE STRING "Release number") From 9d9cffe4c7cd81add1a4c68437b50146bacf3267 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Tue, 19 Sep 2017 15:42:23 +0300 Subject: [PATCH 2/2] MXS-1377 Always delete the pid-file Earlier the pid-file was deleted only if the MaxScale startup succeeded and MaxScale exited in normal fashion. --- server/core/gateway.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/server/core/gateway.cc b/server/core/gateway.cc index 7adf4a317..0c838245c 100644 --- a/server/core/gateway.cc +++ b/server/core/gateway.cc @@ -1325,6 +1325,7 @@ int main(int argc, char **argv) void (*exitfunp[4])(void) = { mxs_log_finish, cleanup_process_datadir, write_footer, NULL }; MXS_CONFIG* cnf = NULL; int numlocks = 0; + bool pid_file_created = false; *syslog_enabled = 1; *maxlog_enabled = 1; @@ -1929,6 +1930,8 @@ int main(int argc, char **argv) rc = MAXSCALE_ALREADYRUNNING; goto return_main; } + + pid_file_created = true; } /** Initialize statistics */ @@ -2080,14 +2083,16 @@ int main(int argc, char **argv) MXS_NOTICE("MaxScale shutdown completed."); unload_all_modules(); - /* Remove Pidfile */ - unlock_pidfile(); - unlink_pidfile(); ERR_free_strings(); EVP_cleanup(); return_main: + if (pid_file_created) + { + unlock_pidfile(); + unlink_pidfile(); + } mxs_log_flush_sync();