mysqld_safe: close stdout and stderr
when they're not needed anymore. Helps when daemonizing it from mysql.init
This commit is contained in:
parent
0e76054b7b
commit
7497ebf8a4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user