summaryrefslogtreecommitdiff
path: root/server-tools
diff options
context:
space:
mode:
Diffstat (limited to 'server-tools')
-rw-r--r--server-tools/instance-manager/Makefile.am2
-rw-r--r--server-tools/instance-manager/guardian.cc5
-rw-r--r--server-tools/instance-manager/instance.cc5
3 files changed, 5 insertions, 7 deletions
diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am
index bedbfce2bce..fd2940dfaef 100644
--- a/server-tools/instance-manager/Makefile.am
+++ b/server-tools/instance-manager/Makefile.am
@@ -32,7 +32,7 @@ liboptions_la_CXXFLAGS= $(CXXFLAGS) \
-DDEFAULT_SOCKET_FILE_NAME="/tmp/mysqlmanager.sock" \
-DDEFAULT_PASSWORD_FILE_NAME="/etc/mysqlmanager.passwd" \
-DDEFAULT_MYSQLD_PATH="$(libexecdir)/mysqld$(EXEEXT)" \
- -DDEFAULT_CONFIG_FILE="/etc/my.cnf" \
+ -DDEFAULT_CONFIG_FILE="my.cnf" \
-DPROTOCOL_VERSION=@PROTOCOL_VERSION@
liboptions_la_SOURCES= options.h options.cc priv.h priv.cc
diff --git a/server-tools/instance-manager/guardian.cc b/server-tools/instance-manager/guardian.cc
index 289e80d8b74..7456a6fc17d 100644
--- a/server-tools/instance-manager/guardian.cc
+++ b/server-tools/instance-manager/guardian.cc
@@ -253,9 +253,8 @@ void Guardian::run()
node= node->next;
}
- timeout.tv_sec= time(NULL) + monitoring_interval;
- timeout.tv_nsec= 0;
-
+ set_timespec(timeout, monitoring_interval);
+
/* check the loop predicate before sleeping */
if (!(shutdown_requested && (!(guarded_instances))))
thread_registry->cond_timedwait(&thread_info, &COND_guardian,
diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc
index 8254cdc302b..99e7daef382 100644
--- a/server-tools/instance-manager/instance.cc
+++ b/server-tools/instance-manager/instance.cc
@@ -635,10 +635,9 @@ int Instance::stop()
waitchild= options.get_shutdown_delay();
kill_mysqld(SIGTERM);
- /* sleep on condition to wait for SIGCHLD */
- timeout.tv_sec= time(NULL) + waitchild;
- timeout.tv_nsec= 0;
+ /* sleep on condition to wait for SIGCHLD */
+ set_timespec(timeout, waitchild);
if (pthread_mutex_lock(&LOCK_instance))
return ER_STOP_INSTANCE;