diff options
author | unknown <jani@rhols221.adsl.netsonic.fi> | 2003-06-14 12:29:42 +0300 |
---|---|---|
committer | unknown <jani@rhols221.adsl.netsonic.fi> | 2003-06-14 12:29:42 +0300 |
commit | 9adfaf1b2f682871fa7577de1e32f199a2955e79 (patch) | |
tree | b9e47e8736a9fd1f17dae2f02b1d095a83a25eb2 /scripts | |
parent | f5fba553259def57df9716d968600fd4f8ae31f9 (diff) | |
download | mariadb-git-9adfaf1b2f682871fa7577de1e32f199a2955e79.tar.gz |
Added option --skip-kill-mysqld to mysqld_safe. This can be useful,
if one is running many mysqlds through mysqld_multi, for example.
Without this option, on Linux one mysqld_safe process may kill
other mysqlds as well, if started using the same binary and path.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysqld_safe.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 626e04b1579..fcd8e26c901 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -10,6 +10,8 @@ # mysql.server works by first doing a cd to the base directory and from there # executing mysqld_safe +KILL_MYSQLD=1; + trap '' 1 2 3 15 # we shouldn't let anyone kill us umask 007 @@ -34,6 +36,9 @@ parse_arguments() { for arg do case "$arg" in + --skip-kill-mysqld*) + KILL_MYSQLD=0; + ;; # these get passed explicitly to mysqld --basedir=*) MY_BASEDIR_VERSION=`echo "$arg" | sed -e "s;--basedir=;;"` ;; --datadir=*) DATADIR=`echo "$arg" | sed -e "s;--datadir=;;"` ;; @@ -83,6 +88,7 @@ parse_arguments() { done } + MY_PWD=`pwd` # Check if we are starting this relative (for the binary release) if test -d $MY_PWD/data/mysql -a -f ./share/mysql/english/errmsg.sys -a \ @@ -298,7 +304,7 @@ do break fi - if @IS_LINUX@ + if test @IS_LINUX@ -a $KILL_MYSQLD -eq 1 then # Test if one process was hanging. # This is only a fix for Linux (running as base 3 mysqld processes) |