From 900b285419ac0234e47c07dfc79caeef091fbcb5 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Tue, 7 Apr 2015 11:33:46 +0300 Subject: run_mysqld: make background runs explicit run_mysqld() should not implicitly background the process. If we need to run it in the background, do it explicitly. While we're at it, sleep less. --- tests/local-server/run_mysqld | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/local-server/run_mysqld b/tests/local-server/run_mysqld index 5db9541..d705ca1 100755 --- a/tests/local-server/run_mysqld +++ b/tests/local-server/run_mysqld @@ -25,7 +25,7 @@ run_mysqld() { --pid-file=$PID_FILE \ --port=$PORT \ --socket=$ROOT/socket \ - "$@" & + "$@" } run_mysql_upgrade() { @@ -44,16 +44,15 @@ init_mysql() { echo "UPDATE user SET password=PASSWORD("$ROOTPW") WHERE user='root';" echo "FLUSH PRIVILEGES;" ) | run_mysqld --bootstrap - sleep 5 - run_mysqld - sleep 5 + run_mysqld & + sleep 1 run_mysql_upgrade "$0" stop set +x } case "$1" in -start) shift; run_mysqld "$@";; +start) shift; run_mysqld "$@" &;; init) init_mysql;; stop) kill `cat "$PID_FILE"`;; restart) -- cgit v1.2.3