diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2015-04-07 11:33:46 +0300 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2015-04-07 11:33:46 +0300 |
commit | 900b285419ac0234e47c07dfc79caeef091fbcb5 (patch) | |
tree | f9b773bee9aacc22f0c2f1e39570d9dfcf99bbf9 | |
parent | c9a2a69514b999d847969b42c4192c0ab39224f8 (diff) |
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.
-rwxr-xr-x | tests/local-server/run_mysqld | 9 |
1 files 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) |