Commit 7497ebf8 authored by Sergei Golubchik's avatar Sergei Golubchik

mysqld_safe: close stdout and stderr

when they're not needed anymore. Helps when
daemonizing it from mysql.init
parent 0e76054b
......@@ -620,6 +620,10 @@ else
logging=syslog
fi
# close stdout and stderr, everything goes to $logging now
exec 1>&-
exec 2>&-
USER_OPTION=""
if test -w / -o "$USER" = "root"
then
......@@ -650,7 +654,7 @@ if [ ! -d $mysql_unix_port_dir ]
then
if ! `mkdir -p $mysql_unix_port_dir`
then
echo "Fatal error Can't create database directory '$mysql_unix_port'"
log_error "Fatal error Can't create database directory '$mysql_unix_port'"
exit 1
fi
chown $user $mysql_unix_port_dir
......
......@@ -308,7 +308,7 @@ case "$mode" in
then
# Give extra arguments to mysqld with the my.cnf file. This script
# may be overwritten at next upgrade.
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null &
$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args &
wait_for_ready; return_value=$?
# Make lock for RedHat / SuSE
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment