diff options
author | Daniel Fischer <df@sun.com> | 2009-07-02 15:18:12 +0200 |
---|---|---|
committer | Daniel Fischer <df@sun.com> | 2009-07-02 15:18:12 +0200 |
commit | e9691bdd4fcd328d975e8a44c2b7f58b1a9ef15f (patch) | |
tree | 94bc87567d69900656cc9f508516004cbbf14a5d /support-files/mysql.server.sh | |
parent | b660e14b04afc54bd88921332d4a76e26b61740d (diff) | |
download | mariadb-git-e9691bdd4fcd328d975e8a44c2b7f58b1a9ef15f.tar.gz |
merge patch for bug#31785
Diffstat (limited to 'support-files/mysql.server.sh')
-rw-r--r-- | support-files/mysql.server.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index bbd93b8f746..87198fc9cf5 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -358,11 +358,18 @@ case "$mode" in if test -s "$pid_file" then mysqlmanager_pid=`cat $pid_file` - echo $echo_n "Shutting down MySQL" - kill $mysqlmanager_pid - # mysqlmanager should remove the pid_file when it exits, so wait for it. - wait_for_pid removed "$mysqlmanager_pid"; return_value=$? - + + if (kill -0 $mysqlmanager_pid 2>/dev/null) + then + echo $echo_n "Shutting down MySQL" + kill $mysqlmanager_pid + # mysqlmanager should remove the pid_file when it exits, so wait for it. + wait_for_pid removed "$mysqlmanager_pid"; return_value=$? + else + log_failure_msg "MySQL manager or server process #$mysqlmanager_pid is not running!" + rm $pid_file + fi + # delete lock for RedHat / SuSE if test -f $lock_dir then |