From: Date: February 1 2008 6:39pm Subject: bk commit into 5.0 tree (df:1.2574) BUG#31785 List-Archive: http://lists.mysql.com/commits/41576 X-Bug: 31785 Message-Id: <200802011740.m11He1R4017100@mail.mysql.com> Below is the list of changes that have just been committed into a local 5.0 repository of df. When df does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2008-02-01 18:39:50+01:00, df@stripped +1 -0 BUG#31785 mysql.server stop does not spot server gone away support-files/mysql.server.sh@stripped, 2008-02-01 18:39:45+01:00, df@stripped +11 -4 BUG#31785 mysql.server stop does not spot server gone away Applied Axel's patch. diff -Nrup a/support-files/mysql.server.sh b/support-files/mysql.server.sh --- a/support-files/mysql.server.sh 2007-11-05 17:46:23 +01:00 +++ b/support-files/mysql.server.sh 2008-02-01 18:39:45 +01:00 @@ -332,10 +332,17 @@ 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; 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; 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